mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 08:42:30 +00:00
Merge branch 'fix/errno-sighandler' of git://github.com/dtzWill/nix
This commit is contained in:
commit
d25d9f7cec
@ -816,8 +816,11 @@ static void processConnection(bool trusted)
|
||||
|
||||
static void sigChldHandler(int sigNo)
|
||||
{
|
||||
// Ensure we don't modify errno of whatever we've interrupted
|
||||
auto saved_errno = errno;
|
||||
/* Reap all dead children. */
|
||||
while (waitpid(-1, 0, WNOHANG) > 0) ;
|
||||
errno = saved_errno;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user