aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/proc/proc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/proc/proc.c b/kernel/proc/proc.c
index 9837a8a..6155b58 100644
--- a/kernel/proc/proc.c
+++ b/kernel/proc/proc.c
@@ -334,8 +334,14 @@ void proc_kill_all()
// TODO: consider children on children
list_iterate(&proc_initproc->p_children, thr, kthread_t, kt_plink)
{
-
+ if(&thr->kt_proc != curproc)
+ {
+ kthread_cancel(thr, 0);
+ }
}
+
+ // kill the current proc
+ do_exit(0);
}
/*