From 6b30affc1ec14bf38a73994e8fdd39f26b5bccb3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 7 Oct 2014 00:39:04 +0100 Subject: [PATCH 1/1] slip: Report unexpected kinds of death from userv If st->expecting_userv_exit, we are expecting userv to exit 0 or die with SIGTERM. If anything else happens, we should at least log it. Signed-off-by: Ian Jackson --- slip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slip.c b/slip.c index 59978c9..3f7935a 100644 --- a/slip.c +++ b/slip.c @@ -230,7 +230,9 @@ static void userv_userv_callback(void *sst, pid_t pid, int status) "(expected %d)\n",pid,st->pid); return; } - if (!st->expecting_userv_exit) { + if (!(st->expecting_userv_exit && + (!status || + (WIFSIGNALED(status) && WTERMSIG(status)==SIGTERM)))) { lg_exitstatus(0,st->slip.nl.name,0, st->expecting_userv_exit ? M_WARNING : M_FATAL, status,"userv"); -- 2.30.2