From: Zbigniew Jędrzejewski-Szmek Date: Sun, 4 Jan 2026 11:18:38 +0000 (+0100) Subject: basic/process-util: use synthetic errno in two more places X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ee73c884e4fecfae57433b9d50caa72816403d5;p=thirdparty%2Fsystemd.git basic/process-util: use synthetic errno in two more places --- diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 42709202a53..92b851573f0 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -894,14 +894,12 @@ int pidref_wait_for_terminate_and_check(const char *name, PidRef *pidref, WaitFl return status.si_status; - } else if (IN_SET(status.si_code, CLD_KILLED, CLD_DUMPED)) { + } else if (IN_SET(status.si_code, CLD_KILLED, CLD_DUMPED)) + return log_full_errno(prio, SYNTHETIC_ERRNO(EPROTO), + "%s terminated by signal %s.", strna(name), signal_to_string(status.si_status)); - log_full(prio, "%s terminated by signal %s.", strna(name), signal_to_string(status.si_status)); - return -EPROTO; - } - - log_full(prio, "%s failed due to unknown reason.", strna(name)); - return -EPROTO; + return log_full_errno(prio, SYNTHETIC_ERRNO(EPROTO), + "%s failed due to unknown reason.", strna(name)); } int kill_and_sigcont(pid_t pid, int sig) {