From 96342de68d0d6de71a062d984dafd2a0905ed9fe Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Mon, 13 Aug 2012 13:58:01 +0200 Subject: 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. --- src/core/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/swap.c') diff --git a/src/core/swap.c b/src/core/swap.c index 458e00efe5..cd4d9ab3d7 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -917,7 +917,7 @@ static void swap_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 = SWAP_SUCCESS; else if (code == CLD_EXITED) f = SWAP_FAILURE_EXIT_CODE; -- cgit v1.2.3-54-g00ecf