]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shutdown: re-enable CAD handling in kernel at start 33355/head
authorMike Yuan <me@yhndnzj.com>
Wed, 5 Jun 2024 15:57:07 +0000 (17:57 +0200)
committerMike Yuan <me@yhndnzj.com>
Sat, 15 Jun 2024 17:29:03 +0000 (19:29 +0200)
src/shutdown/shutdown.c

index 8e11e3533a3c31281040f7ca604381de9ed636b4..03e6e70fd85a83f9d1ad51f4fdcb47bf6bd79a27 100644 (file)
@@ -374,6 +374,11 @@ int main(int argc, char *argv[]) {
 
         log_set_always_reopen_console(true);
 
+        /* Re-enable reboot on Ctrl-Alt-Delete, so that if close/broadcast_signal/umount/... stalls,
+         * or an error is encountered and we freeze(), the user can still initiate a force reboot
+         * through kernel. */
+        (void) reboot(RB_ENABLE_CAD);
+
         r = parse_argv(argc, argv);
         if (r < 0)
                 goto error;