diff --git a/src/service.c b/src/service.c index 0d8c8cf1..9e386a45 100644 --- a/src/service.c +++ b/src/service.c @@ -2522,8 +2522,13 @@ static void service_retry(svc_t *svc) timeout = ((*restart_cnt) <= (svc->restart_max / 2)) ? 2000 : 5000; /* If a longer timeout was specified in the conf, use that instead. */ svc->restart_tmo = max(svc->restart_tmo, timeout); - logit(LOG_CONSOLE|LOG_WARNING, "Service %s[%d] died, restarting (retry in %d msec) (attempt: %d/%d)", - svc_ident(svc, NULL, 0), svc->oldpid, svc->restart_tmo, *restart_cnt, svc->restart_max); + logit(LOG_CONSOLE|LOG_WARNING, "Service %s[%d] died (%s%d), restarting (retry in %d msec) (attempt: %d/%d)", + svc_ident(svc, NULL, 0), svc->oldpid, + WIFEXITED(svc->status) ? "with exit status: " : "by signal: ", + WIFEXITED(svc->status) ? WEXITSTATUS(svc->status) : WTERMSIG(svc->status), + svc->restart_tmo, + *restart_cnt, + svc->restart_max); svc_unblock(svc); service_step(svc);