summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/proc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 3024957..ad2a72b 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -189,6 +189,10 @@ void process_transition(struct process *p, enum process_state state) {
void process_kill(struct process *proc, int ret) {
// TODO kill children
+ if (proc->handled_req) {
+ regs_savereturn(&proc->handled_req->caller->regs, -1);
+ process_transition(proc->handled_req->caller, PS_RUNNING);
+ }
process_transition(proc, PS_DEAD);
proc->death_msg = ret;
process_try2collect(proc);