summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index 01f6aa4..eca5e97 100644
--- a/proc.c
+++ b/proc.c
@@ -337,6 +337,9 @@ proc_exit(void)
cp->fds[fd] = 0;
}
}
+
+ idecref(cp->cwd);
+ cp->cwd = 0;
acquire(&proc_table_lock);
@@ -351,6 +354,7 @@ proc_exit(void)
p->ppid = 1;
// Jump into the scheduler, never to return.
+ cp->killed = 0;
cp->state = ZOMBIE;
sched();
panic("zombie exit");