diff options
author | Michel Stam <m.stam@fugro.nl> | 2014-10-13 16:14:36 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-10-12 13:24:11 +0200 |
commit | 3ff99010e61a0299257ffc91467a16d278a7e774 (patch) | |
tree | 6c3cc68e3faa034a25bee91e320dabb47c014b41 /state.c | |
parent | 8b27adcf7516fa89ced66c840cfb085f2b6067af (diff) | |
download | unitd-3ff99010e61a0299257ffc91467a16d278a7e774.tar unitd-3ff99010e61a0299257ffc91467a16d278a7e774.zip |
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 <m.stam@fugro.nl>
Diffstat (limited to 'state.c')
-rw-r--r-- | state.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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(); |