From: Mike Yuan Date: Sun, 14 Dec 2025 09:24:11 +0000 (+0100) Subject: core/service: do not honor SuccessExitStatus= for our own helpers X-Git-Tag: v259~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=552822992cf5d4e8c760b4853f40a294185c7838;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/service.c b/src/core/service.c index 7098e2744a9..99dd7bd0da3 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;