From 552822992cf5d4e8c760b4853f40a294185c7838 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Sun, 14 Dec 2025 10:24:11 +0100 Subject: [PATCH] core/service: do not honor SuccessExitStatus= for our own helpers They're exclusively under our control, hence errors should not be suppressed based on external user input. --- src/core/service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/service.c b/src/core/service.c index 7098e2744a..99dd7bd0da 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -4116,7 +4116,8 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { else clean_mode = EXIT_CLEAN_DAEMON; - if (is_clean_exit(code, status, clean_mode, &s->success_status)) + /* Our own helper processes are not subject to SuccessExitStatus= as they're opaque to users */ + if (is_clean_exit(code, status, clean_mode, s->control_pid.pid == pid && s->control_command_id < 0 ? NULL : &s->success_status)) f = SERVICE_SUCCESS; else if (code == CLD_EXITED) f = SERVICE_FAILURE_EXIT_CODE;