From edd50504e99917518fa8720600c7693d217e4604 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Thu, 30 May 2013 19:41:45 +0000 Subject: [PATCH] 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 --- commands/tcpd/tcpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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--; } } -- 2.44.0