mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
* Prevent zombies. Previous the SIGCHLD handler only reaped one
zombie at a time, so if multiple children died before the handler got to run, some of them would not be cleaned up.
This commit is contained in:
parent
6fedb7aa0f
commit
3f4ed681c2
@ -534,7 +534,7 @@ static void processConnection()
|
||||
static void sigChldHandler(int sigNo)
|
||||
{
|
||||
/* Reap all dead children. */
|
||||
while (waitpid(-1, 0, WNOHANG) == 0) ;
|
||||
while (waitpid(-1, 0, WNOHANG) > 0) ;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user