summaryrefslogtreecommitdiff
path: root/src/mount.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/mount.c
parent0058d7b91ca90ee2dc605298bc5bac9bef0ededf (diff)
execute: make sending of SIGKILL on shutdown optional
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c39
1 files changed, 33 insertions, 6 deletions
diff --git a/src/mount.c b/src/mount.c
index 077ab9160f..5b433c970a 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -1156,18 +1156,45 @@ static void mount_timer_event(Unit *u, uint64_t elapsed, Watch *w) {
break;
case MOUNT_MOUNTING_SIGTERM:
- log_warning("%s mounting timed out. Killing.", u->meta.id);
- mount_enter_signal(m, MOUNT_MOUNTING_SIGKILL, false);
+ if (m->exec_context.send_sigkill) {
+ log_warning("%s mounting timed out. Killing.", u->meta.id);
+ mount_enter_signal(m, MOUNT_MOUNTING_SIGKILL, false);
+ } else {
+ log_warning("%s mounting timed out. Skipping SIGKILL. Ignoring.", u->meta.id);
+
+ if (m->from_proc_self_mountinfo)
+ mount_enter_mounted(m, false);
+ else
+ mount_enter_dead(m, false);
+ }
break;
case MOUNT_REMOUNTING_SIGTERM:
- log_warning("%s remounting timed out. Killing.", u->meta.id);
- mount_enter_signal(m, MOUNT_REMOUNTING_SIGKILL, false);
+ if (m->exec_context.send_sigkill) {
+ log_warning("%s remounting timed out. Killing.", u->meta.id);
+ mount_enter_signal(m, MOUNT_REMOUNTING_SIGKILL, false);
+ } else {
+ log_warning("%s remounting timed out. Skipping SIGKILL. Ignoring.", u->meta.id);
+
+ if (m->from_proc_self_mountinfo)
+ mount_enter_mounted(m, false);
+ else
+ mount_enter_dead(m, false);
+ }
break;
case MOUNT_UNMOUNTING_SIGTERM:
- log_warning("%s unmounting timed out. Killing.", u->meta.id);
- mount_enter_signal(m, MOUNT_UNMOUNTING_SIGKILL, false);
+ if (m->exec_context.send_sigkill) {
+ log_warning("%s unmounting timed out. Killing.", u->meta.id);
+ mount_enter_signal(m, MOUNT_UNMOUNTING_SIGKILL, false);
+ } else {
+ log_warning("%s unmounting timed out. Skipping SIGKILL. Ignoring.", u->meta.id);
+
+ if (m->from_proc_self_mountinfo)
+ mount_enter_mounted(m, false);
+ else
+ mount_enter_dead(m, false);
+ }
break;
case MOUNT_MOUNTING_SIGKILL: