summaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/procps.c')
-rw-r--r--libbb/procps.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index 5833a1f..9207e92 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -357,7 +357,14 @@ procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags)
sp->gid = sb.st_gid;
}
- if (flags & PSSCAN_STAT) {
+ /* These are all retrieved from proc/NN/stat in one go: */
+ if (flags & (PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID
+ | PSSCAN_COMM | PSSCAN_STATE
+ | PSSCAN_VSZ | PSSCAN_RSS
+ | PSSCAN_STIME | PSSCAN_UTIME | PSSCAN_START_TIME
+ | PSSCAN_TTY | PSSCAN_NICE
+ | PSSCAN_CPU)
+ ) {
char *cp, *comm1;
int tty;
#if !ENABLE_FEATURE_FAST_TOP