In an rfork'd or vfork'd situation where multiple processes are sharing
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 12 Mar 2004 23:09:37 +0000 (23:09 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 12 Mar 2004 23:09:37 +0000 (23:09 +0000)
commit239b4df983d878d51e8fbbb875625e4423d89c33
tree3ab5483db46f7acf2b19638d8c706de3bd62189d
parent2e2da47689dfffe923c53343d89d1b72b7e6f708
In an rfork'd or vfork'd situation where multiple processes are sharing
the same vmspace, and one process goes zombie, the vmspace's vm_exitingcnt
will be non-zero.  If another process then forks or execs the exitingcnt will
be improperly inherited by the new vmspace.  The solution is to not copy
exitingcnt when copying to a new vmspace.

Additionally, for DragonFly, I also had to fix a few cases where the upcall
list was also being improperly inherited.

Heads-up-by: Xin LI <delphij@frontfree.net>
Obtained-From: Peter Wemm <peter@wemm.org> (FreeBSD-5)
sys/kern/kern_exec.c
sys/vm/vm_map.c
sys/vm/vm_map.h