diff --git a/src/haproxy.c b/src/haproxy.c index bb9f0cf9f..4ad370d65 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1898,7 +1898,7 @@ int main(int argc, char **argv) /* it's OK because "-Ds -f x" is the shortest form going here */ memcpy(argv[0] + strlen(argv[0]), "-master", 8); for (proc = 0; proc < global.nbproc; proc++) - while (waitpid(children[proc], NULL, 0) == -1 && errno == EINTR); + while (waitpid(-1, NULL, 0) == -1 && errno == EINTR); } exit(0); /* parent must leave */ }