allow process callback to call uloop_end()
Signed-off-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
parent
2a9edb4642
commit
b8d9b382e3
1 changed files with 4 additions and 2 deletions
6
uloop.c
6
uloop.c
|
@ -680,11 +680,13 @@ void uloop_run(void)
|
||||||
{
|
{
|
||||||
uloop_gettime(&tv);
|
uloop_gettime(&tv);
|
||||||
uloop_process_timeouts(&tv);
|
uloop_process_timeouts(&tv);
|
||||||
if (uloop_cancelled)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (do_sigchld)
|
if (do_sigchld)
|
||||||
uloop_handle_processes();
|
uloop_handle_processes();
|
||||||
|
|
||||||
|
if (uloop_cancelled)
|
||||||
|
break;
|
||||||
|
|
||||||
uloop_gettime(&tv);
|
uloop_gettime(&tv);
|
||||||
uloop_run_events(uloop_get_next_timeout(&tv));
|
uloop_run_events(uloop_get_next_timeout(&tv));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue