summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-10 21:48:08 +0200
committerLennart Poettering <lennart@poettering.net>2016-10-10 21:48:08 +0200
commit41e2036eb83204df95a1c3e829bcfd78ee17aaa3 (patch)
tree6fbf6af9415b879c9b0e9989e181ca84b0af8d8a /src/core
parent3b8769bda8c79283ea89686a16e6cff2e9a6f495 (diff)
exit-status: kill is_clean_exit_lsb(), move logic to sysv-generator
Let's get rid of is_clean_exit_lsb(), let's move the logic for the special handling of the two LSB exit codes into the sysv-generator by writing out appropriate SuccessExitStatus= lines if the LSB header exists. This is not only semantically more correct, bug also fixes a bug as the code in service.c that chose between is_clean_exit_lsb() and is_clean_exit() based this check on whether a native unit files was available for the unit. However, that check was bogus since a long time, since the SysV generator was introduced and native SysV script support was removed from PID 1, as in that case a unit file always existed.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/service.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 99a70395fc..fc1d353356 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2600,8 +2600,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
assert(s);
assert(pid >= 0);
- if (UNIT(s)->fragment_path ? is_clean_exit(code, status, &s->success_status) :
- is_clean_exit_lsb(code, status, &s->success_status))
+ if (is_clean_exit(code, status, &s->success_status))
f = SERVICE_SUCCESS;
else if (code == CLD_EXITED)
f = SERVICE_FAILURE_EXIT_CODE;