summaryrefslogtreecommitdiff
path: root/src/core/scope.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-29 14:58:04 +0100
committerLennart Poettering <lennart@poettering.net>2014-01-29 17:46:47 +0100
commitac84d1fb5a7293df4f75544eedf148ba0bb4ec21 (patch)
treeeec35601f6ce583520e3a41076023624ed183160 /src/core/scope.c
parentc9cf047362cd8e4530c10bc7c2d6db988452305d (diff)
core: make sure to always go through both SIGTERM and SIGKILL states of units
Given that we now have KillMode=mixed where SIGTERM might kill a smaller set than SIGKILL we need to make sure to always go explicitly throught the SIGKILL state to get the right end result.
Diffstat (limited to 'src/core/scope.c')
-rw-r--r--src/core/scope.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/scope.c b/src/core/scope.c
index 87983f6b17..5beb4f80c4 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -238,7 +238,9 @@ static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) {
goto fail;
scope_set_state(s, state);
- } else
+ } else if (state == SCOPE_STOP_SIGTERM)
+ scope_enter_signal(s, SCOPE_STOP_SIGKILL, SCOPE_SUCCESS);
+ else
scope_enter_dead(s, SCOPE_SUCCESS);
return;