From: root Date: Sat, 1 Dec 2007 19:48:36 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: rel-1_6~8 X-Git-Url: https://git.llucax.com/software/libev.git/commitdiff_plain/1e251ffd9e2bf720df7759c2eb3c807f5b0d474f?ds=inline *** empty log message *** --- diff --git a/ev.c b/ev.c index 3518002..2084805 100644 --- a/ev.c +++ b/ev.c @@ -1344,7 +1344,7 @@ ev_loop (EV_P_ int flags) call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */ - while (activecnt) + for (;;) { #ifndef _WIN32 if (expect_false (curpid)) /* penalise the forking check even more */ @@ -1372,6 +1372,9 @@ ev_loop (EV_P_ int flags) call_pending (EV_A); } + if (expect_false (!activecnt)) + break; + /* we might have forked, so reify kernel state if necessary */ if (expect_false (postfork)) loop_fork (EV_A);