* 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 a new issue