0
0
Fork 0
forked from lix-project/lix

* Bug fix: parallel builds of the same derivation failed due to lock file removal.

This commit is contained in:
Eelco Dolstra 2003-12-21 17:09:16 +00:00
parent 06c5a7075d
commit 528f1d1867

View file

@ -87,10 +87,12 @@ PathLocks::~PathLocks()
close(*i); close(*i);
for (Paths::iterator i = paths.begin(); i != paths.end(); i++) { for (Paths::iterator i = paths.begin(); i != paths.end(); i++) {
if (deletePaths) if (deletePaths) {
/* This is not safe in general! */ /* This is not safe in general! */
if (unlink(i->c_str()) != 0) unlink(i->c_str());
throw SysError(format("removing lock file `%1%'") % *i); /* Note that the result of unlink() is ignored; removing
the lock file is an optimisation, not a necessity. */
}
lockedPaths.erase(*i); lockedPaths.erase(*i);
} }
} }