From ba937910775407729e10032943ae0d7a1fb6652d Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 13 Feb 2022 21:50:50 +0100 Subject: [PATCH] Revert 5cdbd57, causes prolonged delays at shutdown/reboot Blocking SIGTERM means Finit will wait another two seconds before it sends SIGKILL, which casues a delayed [WARN] Killing ... before we can proceed to shutdown/reboot -- not OK. Don't know what I was smoking back in 2017, but it must've been good. Signed-off-by: Joachim Wiberg --- src/reboot.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/reboot.c b/src/reboot.c index 874e70bd..62ed56fa 100644 --- a/src/reboot.c +++ b/src/reboot.c @@ -98,11 +98,6 @@ static void do_kill(int signo, char *msg) do_sleep(5); } -static void sig(int signo) -{ - (void)signo; /* NOP */ -} - static int usage(int rc) { fprintf(stderr, "Usage: %s [OPTIONS]\n\n" @@ -164,9 +159,6 @@ int reboot_main(int argc, char *argv[]) /* Check for any overrides */ transform(NULL); - /* Catch and ignore SIGTERM on halt/poweroff */ - signal(SIGTERM, sig); - if (force) { switch (cmd) { case CMD_REBOOT: