From: Ben Gras Date: Thu, 30 May 2013 19:41:45 +0000 (+0000) Subject: tcpd: waitpid() for any child process X-Git-Tag: v3.3.0~949 X-Git-Url: http://zhaoyanbai.com/repos/doxygen.log?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F606%2F1;p=minix.git 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 --- diff --git a/commands/tcpd/tcpd.c b/commands/tcpd/tcpd.c index 2f86d4392..01fa3a194 100644 --- a/commands/tcpd/tcpd.c +++ b/commands/tcpd/tcpd.c @@ -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--; } }