diff --git a/bin/ps/ps.c b/bin/ps/ps.c index e7781d1d9310..8554a2eaa0a2 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -502,7 +502,7 @@ main(int argc, char *argv[]) what = KERN_PROC_PGRP | showthreads; flag = *pgrplist.l.pids; nselectors = 0; - } else if (pidlist.count == 1 && !descendancy) { + } else if (pidlist.count == 1) { what = KERN_PROC_PID | showthreads; flag = *pidlist.l.pids; nselectors = 0; @@ -537,14 +537,6 @@ main(int argc, char *argv[]) if ((kp == NULL && errno != ESRCH) || (kp != NULL && nentries < 0)) xo_errx(1, "%s", kvm_geterr(kd)); nkept = 0; - if (descendancy) - for (elem = 0; elem < pidlist.count; elem++) - for (i = 0; i < nentries; i++) - if (kp[i].ki_ppid == pidlist.l.pids[elem]) { - if (pidlist.count >= pidlist.maxcount) - expand_list(&pidlist); - pidlist.l.pids[pidlist.count++] = kp[i].ki_pid; - } if (nentries > 0) { if ((kinfo = malloc(nentries * sizeof(*kinfo))) == NULL) xo_errx(1, "malloc failed");