aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending/init.c')
-rw-r--r--toys/pending/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/pending/init.c b/toys/pending/init.c
index d9e78ff4..64b61481 100644
--- a/toys/pending/init.c
+++ b/toys/pending/init.c
@@ -348,7 +348,6 @@ static void halt_poweroff_reboot_handler(int sig_no)
reboot_magic_no=RB_POWER_OFF;
break;
case SIGTERM:
- case SIGINT:
error_msg("Requesting system reboot");
reboot_magic_no=RB_AUTOBOOT;
break;
@@ -464,7 +463,6 @@ void init_main(void)
xsignal(SIGUSR1, halt_poweroff_reboot_handler);//halt
xsignal(SIGUSR2, halt_poweroff_reboot_handler);//poweroff
xsignal(SIGTERM, halt_poweroff_reboot_handler);//reboot
- xsignal(SIGINT, halt_poweroff_reboot_handler);//reboot
xsignal(SIGQUIT, restart_init_handler);//restart init
memset(&sig_act, 0, sizeof(sig_act));
sigfillset(&sig_act.sa_mask);
@@ -473,6 +471,7 @@ void init_main(void)
sigaction(SIGTSTP, &sig_act, NULL);
memset(&sig_act, 0, sizeof(sig_act));
sig_act.sa_handler = catch_signal;
+ sigaction(SIGINT, &sig_act, NULL);
sigaction(SIGHUP, &sig_act, NULL);
run_action_from_list(SYSINIT);
check_if_pending_signals();