about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-12-21T17·09+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-12-21T17·09+0000
commit528f1d1867de8b653eed516f8448096d7d138978 (patch)
tree42fecc7d6ee2a2188761968b11208db80a780ea0 /src/libstore
parent06c5a7075d85636ba1fedce1fc5b131cdcffd5f8 (diff)
* Bug fix: parallel builds of the same derivation failed due to lock file removal.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/pathlocks.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc
index c057edce118b..321e965bb34b 100644
--- a/src/libstore/pathlocks.cc
+++ b/src/libstore/pathlocks.cc
@@ -87,10 +87,12 @@ PathLocks::~PathLocks()
         close(*i);
 
     for (Paths::iterator i = paths.begin(); i != paths.end(); i++) {
-        if (deletePaths)
+        if (deletePaths) {
             /* This is not safe in general! */
-            if (unlink(i->c_str()) != 0)
-                throw SysError(format("removing lock file `%1%'") % *i);
+            unlink(i->c_str());
+            /* Note that the result of unlink() is ignored; removing
+               the lock file is an optimisation, not a necessity. */
+        }
         lockedPaths.erase(*i);
     }
 }