service: add options RestartPreventExitStatus and SuccessExitStatus
In some cases, like wrong configuration, restarting after error does not help, so administrator can specify statuses by RestartPreventExitStatus which will not cause restart of a service. Sometimes you have non-standart exit status, so this can be specified by SuccessfulExitStatus.
This commit is contained in:
committed by
Lennart Poettering
parent
d98cc1f29f
commit
96342de68d
+1
-1
@@ -1884,7 +1884,7 @@ static void socket_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
||||
|
||||
s->control_pid = 0;
|
||||
|
||||
if (is_clean_exit(code, status))
|
||||
if (is_clean_exit(code, status, NULL))
|
||||
f = SOCKET_SUCCESS;
|
||||
else if (code == CLD_EXITED)
|
||||
f = SOCKET_FAILURE_EXIT_CODE;
|
||||
|
||||
Reference in New Issue
Block a user