mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
* PathLocks::lockPaths: don't allow reacquiring a lock we already
hold.
This commit is contained in:
parent
455a7b9577
commit
e0d7e47862
2 changed files with 5 additions and 5 deletions
|
@ -161,10 +161,8 @@ void PathLocks::lockPaths(const PathSet & _paths, const string & waitMsg)
|
|||
|
||||
debug(format("locking path `%1%'") % path);
|
||||
|
||||
if (lockedPaths.find(lockPath) != lockedPaths.end()) {
|
||||
debug(format("already holding lock on `%1%'") % lockPath);
|
||||
continue;
|
||||
}
|
||||
if (lockedPaths.find(lockPath) != lockedPaths.end())
|
||||
throw Error("deadlock: trying to re-acquire self-held lock");
|
||||
|
||||
AutoCloseFD fd;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue