[Cmake-commits] CMake branch, next, updated. v3.2.1-1185-ga9282d8

Betsy McPhail betsy.mcphail at kitware.com
Mon Mar 23 16:37:14 EDT 2015


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  a9282d84b211041bb8552d34c9e3e7c633873526 (commit)
       via  1a8d86ad8ba9a87848eed498fe66e715bb7d9ba1 (commit)
      from  b534f579622d0af154689dc14b4952834318741b (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=a9282d84b211041bb8552d34c9e3e7c633873526
commit a9282d84b211041bb8552d34c9e3e7c633873526
Merge: b534f57 1a8d86a
Author:     Betsy McPhail <betsy.mcphail at kitware.com>
AuthorDate: Mon Mar 23 16:37:13 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 23 16:37:13 2015 -0400

    Merge topic 'FileLockUnix-close-file' into next
    
    1a8d86ad When a File Lock was released on Unix, the file handle was not closed


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a8d86ad8ba9a87848eed498fe66e715bb7d9ba1
commit 1a8d86ad8ba9a87848eed498fe66e715bb7d9ba1
Author:     Betsy McPhail <betsy.mcphail at kitware.com>
AuthorDate: Mon Mar 23 16:32:12 2015 -0400
Commit:     Betsy McPhail <betsy.mcphail at kitware.com>
CommitDate: Mon Mar 23 16:32:12 2015 -0400

    When a File Lock was released on Unix, the file handle was not closed
    
    Eventually, it was possible to run out of file handles and locks
    could not longer be acquired.
    
    The file lock functionality was added in commit e6db4c5.

diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx
index fc18a64..36a2d72 100644
--- a/Source/cmFileLockUnix.cxx
+++ b/Source/cmFileLockUnix.cxx
@@ -15,6 +15,7 @@
 #include <errno.h> // errno
 #include <stdio.h> // SEEK_SET
 #include <fcntl.h>
+#include <unistd.h>
 #include "cmSystemTools.h"
 
 cmFileLock::cmFileLock(): File(-1)
@@ -31,6 +32,9 @@ cmFileLockResult cmFileLock::Release()
 
   this->Filename = "";
 
+  ::close(this->File);
+  this->File = -1;
+
   if (lockResult == 0)
     {
     return cmFileLockResult::MakeOk();

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

Summary of changes:
 Source/cmFileLockUnix.cxx |    4 ++++
 1 file changed, 4 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list