kernel - Fix getpid() issue in vfork() when threaded
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 28 Jul 2016 16:39:57 +0000 (09:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 29 Jul 2016 01:26:34 +0000 (18:26 -0700)
commitb4d214925c8f708d2225d8a54f8bb2fa49238618
tree42b3a1d8f17b09c70e07f664f83778f370dc5425
parent26d745521f7cb8212fac718318d1019757601b6c
kernel - Fix getpid() issue in vfork() when threaded

* upmap->invfork was a 0 or 1, but in a threaded program it is possible
  for multiple threads to be in vfork() at the same time.  Change invfork
  to a count.

* Fixes improper getpid() return when concurrent vfork()s are occuring in
  a threaded program.
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c