From: Martin Mares Date: Mon, 7 Nov 2005 22:22:03 +0000 (+0000) Subject: If there are no more filehandles and a timer or event or process hook X-Git-Tag: holmes-import~715 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2f88183327a435c1cfd16e1e84673059a09b19ba;p=libucw.git If there are no more filehandles and a timer or event or process hook orders shutdown, comply immediately without calling poll(). --- diff --git a/lib/mainloop.c b/lib/mainloop.c index c1dad101..57e73742 100644 --- a/lib/mainloop.c +++ b/lib/mainloop.c @@ -395,6 +395,8 @@ main_loop(void) wake = 0; } } + if (main_shutdown) + break; /* FIXME: Here is a small race window where SIGCHLD can come unnoticed. */ if ((tm = clist_head(&main_timer_list)) && tm->expires < wake) wake = tm->expires;