]> mj.ucw.cz Git - libucw.git/commitdiff
If there are no more filehandles and a timer or event or process hook
authorMartin Mares <mj@ucw.cz>
Mon, 7 Nov 2005 22:22:03 +0000 (22:22 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 7 Nov 2005 22:22:03 +0000 (22:22 +0000)
orders shutdown, comply immediately without calling poll().

lib/mainloop.c

index c1dad101f4be22f91f3a77bbcf215be86ade62a8..57e73742134e8d88e28b8dafba42c3becb2f360e 100644 (file)
@@ -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;