diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-10-17 11:12:59 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-10-17 18:04:09 +0200 |
commit | 6cbd15fc52490e85babb60f76a0d1887cbe88696 (patch) | |
tree | 3004c1c44a3e6e61c71e304678c60b09c42f7a1c /src/jobs.c | |
parent | 99ad30bf29c683da833efeac42d8f178b6d2ca8c (diff) |
sig-monitor: Fix exit in signal handler
Calling exit in signal interrupts wasn't correctly handling
the case where the signal interrupts a thread waiting in the
main loop. This can lead to the binder error report:
CRITICAL: Can't enter dispatch while in dispatch!
This patch defers the call to exit in a job.
Bug-AGL: SPEC-2907
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I49c7cca1d229ae957d9ea9bfb8838161ce73a53e
Diffstat (limited to 'src/jobs.c')
-rw-r--r-- | src/jobs.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -838,7 +838,8 @@ void jobs_exit(void (*handler)()) t = t->next; } - /* wait the threads */ + /* wake up the threads */ + evloop_wakeup(); pthread_cond_broadcast(&cond); /* leave */ |