allow positive values to waitpid

This commit is contained in:
Nikos Mavrogiannopoulos
2014-09-25 10:26:50 +02:00
parent f4de7e7757
commit accdb24050

View File

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