kernel - Fix getpid() issue in vfork() when threaded
commit2eca01a4442a6c5012507471a3f39c1662854cde
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 28 Jul 2016 16:39:57 +0000 (28 09:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 28 Jul 2016 16:42:47 +0000 (28 09:42 -0700)
tree85be6060934e1376295137acbec153a7c8a70e37
parent89bbdcc98e01702ae70176ff08df5fb95ee0801b
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