From: Vsevolod Stakhov Date: Tue, 20 Oct 2015 22:31:28 +0000 (+0100) Subject: Fix multiple sigchld processing X-Git-Tag: 1.0.7~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c784381ff5ec5b6cd22f3124256da77564c8a19b;p=rspamd.git Fix multiple sigchld processing --- diff --git a/utils/rspamd_http_bench.c b/utils/rspamd_http_bench.c index 42aa3a5bc..128582f40 100644 --- a/utils/rspamd_http_bench.c +++ b/utils/rspamd_http_bench.c @@ -294,10 +294,10 @@ rspamd_http_bench_cld (int fd, short what, void *arg) { gint res; - wait (&res); - - if (--workers_left == 0) { - event_loopexit (NULL); + while (waitpid (-1, &res, WNOHANG) > 0) { + if (--workers_left == 0) { + event_loopexit (NULL); + } } }