* Bug fix: parallel builds of the same derivation failed due to lock file removal.
This commit is contained in:
parent
06c5a7075d
commit
528f1d1867
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue