Attached is a patch which simply adds ERROR_SHARING_VIOLATION to the set of
errors (currently including only ERROR_ACCESS_DENIED) to the errors that
cause a rename (MoveFile) on Windows to retry.  The condition was observed
when two renames to the same target file name were happening
simultaneously.  Since, in the case observed, both source files were
sharing read, write, and delete and the MoveFileEx calls were using the
"replaceIfExists" flag, you would think that Windows would allow them both
to succeed since either one being the winner is ok.  Arguably a bug (at
least I would argue it's a bug) in Windows.

Eric

Attachment: 0003-Retry-rename-on-Windows-ERROR_SHARING_VIOLATION.patch
Description: Binary data

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to