summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 5bc3da5..66b6e2d 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -142,11 +142,9 @@ getpriority(td, uap)
uap->who = td->td_ucred->cr_uid;
sx_slock(&allproc_lock);
FOREACH_PROC_IN_SYSTEM(p) {
- /* Do not bother to check PRS_NEW processes */
- if (p->p_state == PRS_NEW)
- continue;
PROC_LOCK(p);
- if (p_cansee(td, p) == 0 &&
+ if (p->p_state == PRS_NORMAL &&
+ p_cansee(td, p) == 0 &&
p->p_ucred->cr_uid == uap->who) {
if (p->p_nice < low)
low = p->p_nice;
OpenPOWER on IntegriCloud