diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2012-07-13 15:03:56 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2012-07-13 15:03:56 -0700 |
commit | 8046e1ea6d185c3577f2e9001d3507931cd1d27b (patch) | |
tree | 1cd42064b34fbcdf9707925221022f7ca706bcf4 | |
parent | 45a7b537d3c106d15dd0ec19543c2f5cbbed19dc (diff) | |
download | vyatta-cfg-8046e1ea6d185c3577f2e9001d3507931cd1d27b.tar.gz vyatta-cfg-8046e1ea6d185c3577f2e9001d3507931cd1d27b.zip |
Restore original lock file semantics
Don't fail if lock file already exists
-rw-r--r-- | src/cstore/unionfs/cstore-unionfs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp index 7cfe23d..e21e660 100644 --- a/src/cstore/unionfs/cstore-unionfs.cpp +++ b/src/cstore/unionfs/cstore-unionfs.cpp @@ -706,7 +706,7 @@ UnionfsCstore::getCommitLock() int fd; fd = open(C_COMMIT_LOCK_FILE.c_str(), - O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666); + O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666); if (fd < 0) { // should not happen since all commit processes should have write access output_internal("getCommitLock() failed to open lock file\n"); |