1
0
Fork 0
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:
Eelco Dolstra 2007-08-28 09:39:03 +00:00
parent 455a7b9577
commit e0d7e47862
2 changed files with 5 additions and 5 deletions

View file

@ -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;