If P_ZOMBIE(pr->ps_mainproc) is true, then (pr->ps_flags & PS_EXITING)
authorguenther <guenther@openbsd.org>
Sat, 3 May 2014 23:30:04 +0000 (23:30 +0000)
committerguenther <guenther@openbsd.org>
Sat, 3 May 2014 23:30:04 +0000 (23:30 +0000)
commitb5cdceccaa4dc20e4550cbf42ab30878f1f51b95
tree45b296de629a6ecf9d90f4c9680730222977e54e
parent6a829ea5d50b5ef8ad50138e97f71d86300f9730
If P_ZOMBIE(pr->ps_mainproc) is true, then (pr->ps_flags & PS_EXITING)
is, so eliminate the check of the former and instead use the EINVAL
error for the latter.  Also, consistently check for PS_EXITING
before check creds.

suggestion to split this from another diff miod@
sys/kern/kern_sysctl.c