aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-08-23 12:23:39 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-08-23 12:42:14 +0200
commit8aac4b82fa18fe6f0feacac86fdde3d78b19cd18 (patch)
tree51075bc3b4f4ff68cbd1717934900b502da1a186
parent2991a2564bc5e21b04dcb3157ce38804080c0056 (diff)
jobs: Abort when systemd's event loop lostflounder_5.99.4flounder/5.99.45.99.4
When sd_event_prepare returns an error there is currently no way to restore the event loop working. It happens when a callback of an sd_event is faulty (ex: SIGSEGV). In that case the monitoring of signals (sig-monitor) interfer badly with systemd. But at the the application firstly has error. To avoid flooding the journal with messages, aborting is the best solution. Bug-AGL: SPEC-1681 Change-Id: If01295f07b3c3fc8c8ec1ac5bf04840d42ee9774 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/jobs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jobs.c b/src/jobs.c
index 16434d4f..27b7dfbf 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -313,7 +313,8 @@ static void evloop_run(int signum, void *arg)
rc = sd_event_prepare(se);
if (rc < 0) {
errno = -rc;
- ERROR("sd_event_prepare returned an error (state: %d): %m", sd_event_get_state(se));
+ CRITICAL("sd_event_prepare returned an error (state: %d): %m", sd_event_get_state(se));
+ abort();
} else {
if (rc == 0) {
rc = sd_event_wait(se, (uint64_t)(int64_t)-1);