From 92f3b785690f5c23e1b84b6e726d7859d0ab1608 Mon Sep 17 00:00:00 2001 From: Isaac Dunham Date: Thu, 20 Aug 2015 11:49:16 -0500 Subject: I discovered that the reason SIGINT causes a reboot on sysvinit is that it's how the kernel signals that ctrl-alt-delete has been pressed; thus, setting it as the signal for reboot prevents ctrlaltdel scripts from working. SIGTERM is what Busybox uses, so we might as well be compatible. --- toys/other/reboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other') diff --git a/toys/other/reboot.c b/toys/other/reboot.c index 1e8f5e9b..15eea285 100644 --- a/toys/other/reboot.c +++ b/toys/other/reboot.c @@ -25,7 +25,7 @@ config REBOOT void reboot_main(void) { int types[] = {RB_AUTOBOOT, RB_HALT_SYSTEM, RB_POWER_OFF}, - sigs[] = {SIGINT, SIGUSR1, SIGUSR2}, idx; + sigs[] = {SIGTERM, SIGUSR1, SIGUSR2}, idx; if (!(toys.optflags & FLAG_n)) sync(); -- cgit v1.2.3