aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-02-23 13:00:08 -0800
committerRob Landley <rob@landley.net>2020-02-25 02:30:22 -0600
commitd227e4aab673364ca9f35fa8ff0e0477385f97f7 (patch)
treec552cc6596259b1b1f96e9ea3e960e575c9ba57d /toys/posix
parent333a10f9ef596fab2c17f47df8278615ea2ce1d3 (diff)
downloadtoybox-d227e4aab673364ca9f35fa8ff0e0477385f97f7.tar.gz
ps: widen pid_t fields.
My desktop and laptop have a pid_max of 262144 now.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/ps.c5
1 files 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},