From b8d9b382e39823850331edc2a92379173daf1be3 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 21 Mar 2015 05:49:38 +0100 Subject: [PATCH] allow process callback to call uloop_end() Signed-off-by: John Crispin --- uloop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)); } -- 2.25.1