]> source.dussan.org Git - rspamd.git/commitdiff
Fix multiple sigchld processing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 20 Oct 2015 22:31:28 +0000 (23:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 20 Oct 2015 22:31:28 +0000 (23:31 +0100)
utils/rspamd_http_bench.c

index 42aa3a5bcca453daaad59250f1fb7fd617695fb3..128582f408b1feca5dc46aa027ac9518d0e1ade4 100644 (file)
@@ -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);
+               }
        }
 }