From accdb24050a1de06c0408c9d783aa0575e35e831 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 25 Sep 2014 10:26:50 +0200 Subject: [PATCH] allow positive values to waitpid --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 9a95e6cd..af90d202 100644 --- a/src/main.c +++ b/src/main.c @@ -847,7 +847,7 @@ unsigned total = 10; remove(s->config->occtl_socket_file); remove_pid_file(); - while (waitpid(-1, NULL, WNOHANG) == 0) { + while (waitpid(-1, NULL, WNOHANG) >= 0) { if (total == 0) { mslog(s, NULL, LOG_INFO, "not everyone died; forcing kill"); kill(0, SIGKILL);