summaryrefslogtreecommitdiff
path: root/src/swap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-01-18 22:55:54 +0100
committerLennart Poettering <lennart@poettering.net>2011-01-18 22:55:54 +0100
commitba035df230e41bf9d70ebb47915c9472b7884412 (patch)
tree37f5af1b2de9a93e15ee36ef080436619cfdbec9 /src/swap.c
parent0058d7b91ca90ee2dc605298bc5bac9bef0ededf (diff)
execute: make sending of SIGKILL on shutdown optional
Diffstat (limited to 'src/swap.c')
-rw-r--r--src/swap.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/swap.c b/src/swap.c
index 0d3cb2f406..9bdb5aabf6 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -995,13 +995,23 @@ static void swap_timer_event(Unit *u, uint64_t elapsed, Watch *w) {
break;
case SWAP_ACTIVATING_SIGTERM:
- log_warning("%s activation timed out. Killing.", u->meta.id);
- swap_enter_signal(s, SWAP_ACTIVATING_SIGKILL, false);
+ if (s->exec_context.send_sigkill) {
+ log_warning("%s activation timed out. Killing.", u->meta.id);
+ swap_enter_signal(s, SWAP_ACTIVATING_SIGKILL, false);
+ } else {
+ log_warning("%s activation timed out. Skipping SIGKILL. Ignoring.", u->meta.id);
+ swap_enter_dead(s, false);
+ }
break;
case SWAP_DEACTIVATING_SIGTERM:
- log_warning("%s deactivation timed out. Killing.", u->meta.id);
- swap_enter_signal(s, SWAP_DEACTIVATING_SIGKILL, false);
+ if (s->exec_context.send_sigkill) {
+ log_warning("%s deactivation timed out. Killing.", u->meta.id);
+ swap_enter_signal(s, SWAP_DEACTIVATING_SIGKILL, false);
+ } else {
+ log_warning("%s deactivation timed out. Skipping SIGKILL. Ignoring.", u->meta.id);
+ swap_enter_dead(s, false);
+ }
break;
case SWAP_ACTIVATING_SIGKILL: