chiark / gitweb /
test: allow deletion of temporary files from normal fs
[elogind.git] / src / core / shutdown.c
index 363046e1a49ef9ff1462e13a78b60008d4debf05..105a604542b001cb760a66ff404b978e58f970d0 100644 (file)
@@ -44,6 +44,7 @@
 #include "mkdir.h"
 #include "virt.h"
 #include "watchdog.h"
+#include "killall.h"
 
 #define FINALIZE_ATTEMPTS 50
 
@@ -115,7 +116,7 @@ static int pivot_to_new_root(void) {
 
         if (pivot_root(".", "oldroot") < 0) {
                 log_error("pivot failed: %m");
-                /* only chroot if pivot root succeded */
+                /* only chroot if pivot root succeeded */
                 return -errno;
         }
 
@@ -176,14 +177,15 @@ int main(int argc, char *argv[]) {
         mlockall(MCL_CURRENT|MCL_FUTURE);
 
         log_info("Sending SIGTERM to remaining processes...");
-        broadcast_signal(SIGTERM);
+        broadcast_signal(SIGTERM, true);
 
         log_info("Sending SIGKILL to remaining processes...");
-        broadcast_signal(SIGKILL);
+        broadcast_signal(SIGKILL, true);
 
         if (in_container) {
                 need_swapoff = false;
                 need_dm_detach = false;
+                need_loop_detach = false;
         }
 
         /* Unmount all mountpoints, swaps, and loopback devices */