openbsd-ports/sysutils/pstree/patches/patch-pstree_c
steven cc608c2f43 update to pstree 2.27.
Sam Smith gives up maintainership.

"looks sensible" sturm@
2006-07-14 05:17:18 +00:00

22 lines
883 B
Plaintext

$OpenBSD: patch-pstree_c,v 1.2 2006/07/14 05:17:18 steven Exp $
--- pstree.c.orig Fri Apr 8 22:08:47 2005
+++ pstree.c Wed Jul 12 08:51:24 2006
@@ -71,7 +71,7 @@ extern getargs(struct ProcInfo *, int, c
* (Net|Open|Free)BSD & Darwin merged by Ralf Meyer <ralf AT thp.Uni-Duisburg.DE>
*/
# define HAS_PGID
-# define PSCMD "ps -axwwo user,pid,ppid,pgid,command"
+# define PSCMD "ps -kaxwwo user,pid,ppid,pgid,command"
# define PSFORMAT "%s %ld %ld %ld %[^\n]"
# define PSVARS P[i].name, &P[i].pid, &P[i].ppid, &P[i].pgid, P[i].cmd
# define PSVARSN 5
@@ -515,7 +515,7 @@ int GetProcesses(void) {
int GetRootPid(void) {
int me;
for (me = 0; me < NProc; me++) {
- if (P[me].pid == -1) return P[me].pid;
+ if (P[me].pid == 1) return P[me].pid;
}
/* PID == 1 not found, so we'll take process with PPID == 0
* Fix for TRU64 TruCluster with uniq PIDs