summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-13 14:41:57 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-13 14:41:57 +0200
commitbd3fa1d2434aa28564251ac4da34d01537de8c4b (patch)
treecf92230cd221fc4cfb5df8a1d04c0ec8cd092e10 /src/core/main.c
parent32c4bef8826f1231984d735944cb02a01d21177a (diff)
core: go on a killing spree when transitioning from initrd to main system
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 6f6b565d68..87cb4ffb5c 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -51,6 +51,7 @@
#include "path-util.h"
#include "switch-root.h"
#include "capability.h"
+#include "killall.h"
#include "mount-setup.h"
#include "loopback-setup.h"
@@ -1676,6 +1677,11 @@ finish:
make_console_stdio();
if (switch_root_dir) {
+ /* Kill all remaining processes from the initrd */
+ broadcast_signal(SIGTERM);
+ broadcast_signal(SIGKILL);
+
+ /* And switch root */
r = switch_root(switch_root_dir);
if (r < 0)
log_error("Failed to switch root, ignoring: %s", strerror(-r));