[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-3156-g4c34c08

Brad King brad.king at kitware.com
Tue May 13 15:23:17 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  4c34c084f0f96bb5c268e93fdf5067832cc8e5f9 (commit)
       via  24bd7ae11af5dc989e569fee8422018a92c4f23e (commit)
      from  90ead5a608c5c9d652f8bfb59b71079df6d58c3f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c34c084f0f96bb5c268e93fdf5067832cc8e5f9
commit 4c34c084f0f96bb5c268e93fdf5067832cc8e5f9
Merge: 90ead5a 24bd7ae
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue May 13 15:23:16 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue May 13 15:23:16 2014 -0400

    Merge topic 'fix-atomic-rename-Windows-sharing-violation' into next
    
    24bd7ae1 cmSystemTools::RenameFile: Retry on Windows ERROR_SHARING_VIOLATION


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24bd7ae11af5dc989e569fee8422018a92c4f23e
commit 24bd7ae11af5dc989e569fee8422018a92c4f23e
Author:     Eric Berge <ericmberge at gmail.com>
AuthorDate: Tue May 13 09:10:38 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue May 13 15:23:36 2014 -0400

    cmSystemTools::RenameFile: Retry on Windows ERROR_SHARING_VIOLATION
    
    Add ERROR_SHARING_VIOLATION to the set of errors (previously including
    only ERROR_ACCESS_DENIED) 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.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index ff05975..c7acfd0 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -917,8 +917,10 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
                      cmsys::Encoding::ToWide(newname).c_str(),
                      MOVEFILE_REPLACE_EXISTING) && --retry.Count)
     {
-    // Try again only if failure was due to access permissions.
-    if(GetLastError() != ERROR_ACCESS_DENIED)
+    DWORD last_error = GetLastError();
+    // Try again only if failure was due to access/sharing permissions.
+    if(last_error != ERROR_ACCESS_DENIED &&
+       last_error != ERROR_SHARING_VIOLATION)
       {
       return false;
       }

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list