aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2015-08-20 11:49:16 -0500
committerRob Landley <rob@landley.net>2015-08-20 11:49:16 -0500
commit92f3b785690f5c23e1b84b6e726d7859d0ab1608 (patch)
tree327dc8a73c8e58c1356d320bc4081b66491f2dab /toys/other
parent4e49e2cca731f2e1dd01ebc5163beb71e0d640ec (diff)
downloadtoybox-92f3b785690f5c23e1b84b6e726d7859d0ab1608.tar.gz
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.
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/reboot.c2
1 files changed, 1 insertions, 1 deletions
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();