On Mon, Jan 4, 2016 at 9:12 AM, Derek Buitenhuis <derek.buitenh...@gmail.com> wrote: > On 1/4/2016 4:46 PM, Ganesh Ajjanagadde wrote: >> Yes, this is strange. url_move points to file_move, and the only >> system functionality it relies on is rename, available in stdio.h. The >> semantics vary from system to system, with some details specified in >> POSIX, but rename itself is standard C: >> http://en.cppreference.com/w/c/io/rename. >> As the code is recent, dating to this year's gsoc, 824a82d1b8, it may >> not be too surprising that this was not addressed yet. > > I know rename is not atomic on Windows, if that matters.
Nothing in the docs for url_move requires that the callback be atomic, though it is indeed a very useful property here. Personally, I think it should be ok to use rename here for now, especially since even projects like Python had trouble with this aspect: https://bugs.python.org/issue8828. Someone with greater Windows expertise can then examine the validity of https://stackoverflow.com/questions/167414/is-an-atomic-file-rename-with-overwrite-possible-on-windows#, where there seems to be a lack of clarity, and perhaps make a better effort at an atomic rename operation for Windows. > > - Derek > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel