From 2f88183327a435c1cfd16e1e84673059a09b19ba Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 7 Nov 2005 22:22:03 +0000 Subject: [PATCH] If there are no more filehandles and a timer or event or process hook orders shutdown, comply immediately without calling poll(). --- lib/mainloop.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.2