From: John Crispin Date: Sat, 21 Mar 2015 04:49:38 +0000 (+0100) Subject: allow process callback to call uloop_end() X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=commitdiff_plain;h=b8d9b382e39823850331edc2a92379173daf1be3 allow process callback to call uloop_end() Signed-off-by: John Crispin --- diff --git a/uloop.c b/uloop.c index 9ebeca6..ea160a0 100644 --- a/uloop.c +++ b/uloop.c @@ -680,11 +680,13 @@ void uloop_run(void) { uloop_gettime(&tv); uloop_process_timeouts(&tv); - if (uloop_cancelled) - break; if (do_sigchld) uloop_handle_processes(); + + if (uloop_cancelled) + break; + uloop_gettime(&tv); uloop_run_events(uloop_get_next_timeout(&tv)); }