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:
Ben Gras 2013-05-30 19:41:45 +00:00
parent 62da011387
commit edd50504e9

View file

@ -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--;
}
}