service_enabled(): Only check WCOREDUMP() from if WIFSIGNALED()

Patch courtesy of Westermo.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-09-28 19:17:30 +02:00
parent 545f3105e2
commit 9491f18972
+1 -1
View File
@@ -128,7 +128,7 @@ svc_cmd_t service_enabled(svc_t *svc, int event, void *arg)
return WEXITSTATUS(status);
/* Check for SEGFAULT or other error ... */
if (WCOREDUMP(status))
if (WIFSIGNALED(status) && WCOREDUMP(status))
_e("Callback to %s crashed!\n", svc->cmd);
else
_e("Callback to %s did not exit normally!\n", svc->cmd);