diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-20 23:31:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-20 23:31:28 +0100 |
commit | c784381ff5ec5b6cd22f3124256da77564c8a19b (patch) | |
tree | cfd2629a1b7f0af2901017ac23f444edc988886c /utils | |
parent | 1027e57ab831916be8bd5ae678e667ca93dffe43 (diff) | |
download | rspamd-c784381ff5ec5b6cd22f3124256da77564c8a19b.tar.gz rspamd-c784381ff5ec5b6cd22f3124256da77564c8a19b.zip |
Fix multiple sigchld processing
Diffstat (limited to 'utils')
-rw-r--r-- | utils/rspamd_http_bench.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); + } } } |