summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorrtm <rtm>2006-08-29 19:59:52 +0000
committerrtm <rtm>2006-08-29 19:59:52 +0000
commit7a37578e9efcba67d82fbfee7d03cba830a41106 (patch)
tree1d86660c9a91ed3cd2bbbdda17bc0e79ea21a924 /proc.c
parentdfcc5b997ce9c313b9ac0e7d8da39c4416b472a8 (diff)
downloadxv6-labs-7a37578e9efcba67d82fbfee7d03cba830a41106.tar.gz
xv6-labs-7a37578e9efcba67d82fbfee7d03cba830a41106.tar.bz2
xv6-labs-7a37578e9efcba67d82fbfee7d03cba830a41106.zip
clear killed flag in exit
idecref cwd in exit
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");