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