aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/init.c3
-rw-r--r--init/log.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index e82a504..ad1e182 100644
--- a/init/init.c
+++ b/init/init.c
@@ -99,6 +99,7 @@ int main(void)
siginfo_t siginfo;
static sigset_t set;
sigaddset(&set, SIGCHLD);
+ sigaddset(&set, SIGINT);
sigprocmask(SIG_BLOCK, &set, NULL);
while(subsystem_count > 0) {
@@ -113,6 +114,8 @@ int main(void)
if(siginfo.si_status != 0) {
panic("init: process %d exited with non-zero status (%d)", siginfo.si_status);
}
+ } else if(sig == SIGINT) {
+ panic("init: keyboard interrupt");
}
}
diff --git a/init/log.c b/init/log.c
index a3d0a7a..5c1b883 100644
--- a/init/log.c
+++ b/init/log.c
@@ -168,8 +168,9 @@ void _panic(const char *fileorigin,
}
/* if we are going to die, we dont really need to clean up */
- if(mode == PANICMODE_DIE)
- kill(-getpgid(pid), SIGINT);
+ if(mode == PANICMODE_DIE) {
+ kill(-getpgid(pid), SIGKILL);
+ }
print(NOLOCK("5") "------------[ cut here ]------------");