From ac84d1fb5a7293df4f75544eedf148ba0bb4ec21 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 29 Jan 2014 14:58:04 +0100 Subject: 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. --- src/core/mount.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core/mount.c') diff --git a/src/core/mount.c b/src/core/mount.c index 90da883826..45c0040bd1 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -854,8 +854,14 @@ static void mount_enter_signal(Mount *m, MountState state, MountResult f) { goto fail; mount_set_state(m, state); - } else if (state == MOUNT_REMOUNTING_SIGTERM || state == MOUNT_REMOUNTING_SIGKILL) + } else if (state == MOUNT_REMOUNTING_SIGTERM) + mount_enter_signal(m, MOUNT_REMOUNTING_SIGKILL, MOUNT_SUCCESS); + else if (state == MOUNT_REMOUNTING_SIGKILL) mount_enter_mounted(m, MOUNT_SUCCESS); + else if (state == MOUNT_MOUNTING_SIGTERM) + mount_enter_signal(m, MOUNT_MOUNTING_SIGKILL, MOUNT_SUCCESS); + else if (state == MOUNT_UNMOUNTING_SIGTERM) + mount_enter_signal(m, MOUNT_UNMOUNTING_SIGKILL, MOUNT_SUCCESS); else mount_enter_dead(m, MOUNT_SUCCESS); -- cgit v1.2.3-54-g00ecf