tcpd: waitpid() for any child process
. prevents zombies from accumulating for as long as tcpd exists for child processes that create their own process group, e.g. ftpd. Change-Id: Ic56597810f7d17e1cc28b755e2d1998ecf49a27c
This commit is contained in:
parent
62da011387
commit
edd50504e9
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ static void report(const char *label)
|
|||
|
||||
static void sigchld(int sig)
|
||||
{
|
||||
while (waitpid(0, NULL, WNOHANG) > 0) {
|
||||
while (waitpid(-1, NULL, WNOHANG) > 0) {
|
||||
if (nchildren > 0) nchildren--;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue