summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index cf5bb1e..74660fa 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -137,6 +137,11 @@ void process_kill(struct process *proc, int ret) {
proc->state = PS_DEAD;
proc->death_msg = ret;
process_try2collect(proc);
+ if (proc == process_first) {
+ tty_const("init killed, quitting...");
+ mem_debugprint();
+ cpu_shutdown();
+ }
}
int process_try2collect(struct process *dead) {