aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/rspamd_http_bench.c8
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);
+ }
}
}