My desktop and laptop have a pid_max of 262144 now.
---
toys/posix/ps.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From 9488c4a84f6512f21fbdf960c442adb6f62b2d08 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Sun, 23 Feb 2020 13:00:08 -0800
Subject: [PATCH] ps: widen pid_t fields.
My desktop and laptop have a pid_max of 262144 now.
---
toys/posix/ps.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 0c8e8e81..cd8c73ea 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -311,13 +311,14 @@ struct procpid {
#define XX 64 // force string representation for sorting, etc
// TODO: Android uses -30 for LABEL, but ideally it would auto-size.
+// TODO: ideally, PID and PPID would auto-size too.
struct typography {
char *name, *help;
signed char width, slot;
} static const typos[] = TAGGED_ARRAY(PS,
// Numbers. (What's in slot[] is what's displayed, sorted numerically.)
- {"PID", "Process ID", 5, SLOT_pid},
- {"PPID", "Parent Process ID", 5, SLOT_ppid},
+ {"PID", "Process ID", 6, SLOT_pid},
+ {"PPID", "Parent Process ID", 6, SLOT_ppid},
{"PRI", "Priority (dynamic 0 to 139)", 3, SLOT_priority},
{"NI", "Niceness (static 19 to -20)", 3, SLOT_nice},
{"ADDR", "Instruction pointer", 4+sizeof(long), SLOT_eip},
--
2.25.0.265.gbab2e86ba0-goog
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net