forked from lix-project/lix
* 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);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue