summaryrefslogtreecommitdiff
path: root/src/basic/exit-status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/exit-status.c')
-rw-r--r--src/basic/exit-status.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/exit-status.c b/src/basic/exit-status.c
index 96d4619da6..59557f8afe 100644
--- a/src/basic/exit-status.c
+++ b/src/basic/exit-status.c
@@ -177,17 +177,17 @@ const char* exit_status_to_string(int status, ExitStatusLevel level) {
return NULL;
}
-bool is_clean_exit(int code, int status, ExitStatusSet *success_status) {
+bool is_clean_exit(int code, int status, ExitClean clean, ExitStatusSet *success_status) {
if (code == CLD_EXITED)
return status == 0 ||
(success_status &&
set_contains(success_status->status, INT_TO_PTR(status)));
- /* If a daemon does not implement handlers for some of the
- * signals that's not considered an unclean shutdown */
+ /* If a daemon does not implement handlers for some of the signals that's not considered an unclean shutdown */
if (code == CLD_KILLED)
- return IN_SET(status, SIGHUP, SIGINT, SIGTERM, SIGPIPE) ||
+ return
+ (clean == EXIT_CLEAN_DAEMON && IN_SET(status, SIGHUP, SIGINT, SIGTERM, SIGPIPE)) ||
(success_status &&
set_contains(success_status->signal, INT_TO_PTR(status)));