* proc/pgrp.c (S_proc_getpgrppids): Fix miscalculation of count. --- proc/pgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proc/pgrp.c b/proc/pgrp.c index 3b5dba1..403de97 100644 --- a/proc/pgrp.c +++ b/proc/pgrp.c @@ -265,7 +265,7 @@ S_proc_getpgrppids (struct proc *callerp, count = 0; for (p = pg->pg_plist; p; p = p->p_gnext) - if (++count <= npids && !p->p_essential) + if (!p->p_essential && ++count <= npids) *pp++ = p->p_pid; if (count > npids) -- 1.7.10.4