chiark / gitweb /
core: add a system-wide SystemCallArchitectures= setting
[elogind.git] / src / core / shutdown.c
index b5eb8b12de2752350cf0c164a81b98882f50fd3d..8420a6753552ae7302566fcc0bab3c9df115a53e 100644 (file)
@@ -24,7 +24,6 @@
 #include <sys/reboot.h>
 #include <linux/reboot.h>
 #include <sys/wait.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/mount.h>
 #include <sys/syscall.h>
@@ -156,6 +155,7 @@ int main(int argc, char *argv[]) {
 
         log_parse_environment();
         log_set_target(LOG_TARGET_CONSOLE); /* syslog will die if not gone yet */
+        log_close_console(); /* force reopen of /dev/console */
         log_open();
 
         umask(0022);
@@ -196,10 +196,10 @@ int main(int argc, char *argv[]) {
         mlockall(MCL_CURRENT|MCL_FUTURE);
 
         log_info("Sending SIGTERM to remaining processes...");
-        broadcast_signal(SIGTERM, true);
+        broadcast_signal(SIGTERM, true, true);
 
         log_info("Sending SIGKILL to remaining processes...");
-        broadcast_signal(SIGKILL, true);
+        broadcast_signal(SIGKILL, true, false);
 
         if (in_container) {
                 need_swapoff = false;