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.
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@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars