diff options
author | Ron Yorston <rmy@pobox.com> | 2024-05-14 14:03:25 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-05-14 14:03:25 +0100 |
commit | 4e0359ce93c4b0185c5340d03be505b609417b04 (patch) | |
tree | d6e876e08778e88f162657ef237400cdb438de61 /include | |
parent | 569de936abb90f4c7cdca9da111a6ea780b135bf (diff) | |
download | busybox-w32-4e0359ce93c4b0185c5340d03be505b609417b04.tar.gz busybox-w32-4e0359ce93c4b0185c5340d03be505b609417b04.tar.bz2 busybox-w32-4e0359ce93c4b0185c5340d03be505b609417b04.zip |
ps: report unknown parent PID as 1
If the parent PID doesn't appear in the process table, report it
as 1. This more closely matches how orphaned children are handled
on UNIX.
Adds 96-128 bytes.
(GitHub issue #416)
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index a7d31ed0c..8d5537114 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -2148,6 +2148,9 @@ typedef struct procps_status_t { | |||
2148 | DIR *dir; | 2148 | DIR *dir; |
2149 | #else | 2149 | #else |
2150 | HANDLE snapshot; | 2150 | HANDLE snapshot; |
2151 | unsigned *pids; | ||
2152 | int npids; | ||
2153 | int maxpids; | ||
2151 | #endif | 2154 | #endif |
2152 | IF_FEATURE_SHOW_THREADS(DIR *task_dir;) | 2155 | IF_FEATURE_SHOW_THREADS(DIR *task_dir;) |
2153 | uint8_t shift_pages_to_bytes; | 2156 | uint8_t shift_pages_to_bytes; |