From 3ff99010e61a0299257ffc91467a16d278a7e774 Mon Sep 17 00:00:00 2001 From: Michel Stam Date: Mon, 13 Oct 2014 16:14:36 +0200 Subject: Fix ctrl+alt+del support The previous patch did not catch SIGINT, which is used by the kernel to indicate to the init process that the system should reboot. Signed-off-by: Michel Stam --- state.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'state.c') diff --git a/state.c b/state.c index 7f0ec50..0896e1a 100644 --- a/state.c +++ b/state.c @@ -131,6 +131,8 @@ static void state_enter(void) break; case STATE_HALT: + // To prevent killed processes from interrupting the sleep + signal(SIGCHLD, SIG_IGN); LOG("- SIGTERM processes -\n"); kill(-1, SIGTERM); sync(); -- cgit v1.2.3