If the only process in the pgrp is in the middle of exiting, it might
authorguenther <guenther@openbsd.org>
Sun, 13 Jul 2014 14:56:56 +0000 (14:56 +0000)
committerguenther <guenther@openbsd.org>
Sun, 13 Jul 2014 14:56:56 +0000 (14:56 +0000)
commit492fea0e9ba38d1c790c8adbf62fdeb356dae1ae
tree3d512a8af459ac0d0dcdda5cd95c6a79e642432b
parentc36dd2c943f7b3cfbf24d93c552313b79d66d2f0
If the only process in the pgrp is in the middle of exiting, it might
not have any threads left.  Treat that the same as an empty pgrp.

encountered by and ok deraadt@
sys/kern/tty.c