aboutsummaryrefslogtreecommitdiffstats
path: root/src/jobs.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-10-17 11:12:59 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-10-17 12:07:57 +0200
commitb612db216c2793c34e264254794db3308d20d796 (patch)
treea1aacd605ccb4b6d76707693c670210983bf9159 /src/jobs.c
parent6f42df1ed42331d115991bbb1937df15b160bdfc (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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jobs.c b/src/jobs.c
index 3b617b56..aa014f3a 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -915,6 +915,7 @@ void jobs_exit(void (*handler)())
}
/* wake up the threads */
+ evloop_wakeup();
pthread_cond_broadcast(&cond);
/* leave */