mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
* Make lock removal safe by signalling to blocked processes that the
lock they are waiting on has become stale (we do this by writing a meaningless token to the unlinked file).
This commit is contained in:
parent
a24b78e9f1
commit
59682e6188
4 changed files with 52 additions and 21 deletions
|
@ -415,6 +415,15 @@ bool AutoCloseFD::isOpen()
|
|||
}
|
||||
|
||||
|
||||
/* Pass responsibility for closing this fd to the caller. */
|
||||
int AutoCloseFD::borrow()
|
||||
{
|
||||
int oldFD = fd;
|
||||
fd = -1;
|
||||
return oldFD;
|
||||
}
|
||||
|
||||
|
||||
void Pipe::create()
|
||||
{
|
||||
int fds[2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue