mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* Bug fix: parallel builds of the same derivation failed due to lock file removal.
This commit is contained in:
parent
06c5a7075d
commit
528f1d1867
1 changed files with 5 additions and 3 deletions
|
@ -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