From ab8b5f314d62f19e43b9f03b6a8cfcd6770afd57 Mon Sep 17 00:00:00 2001 From: albert <> Date: Sun, 8 Dec 2002 18:51:56 +0000 Subject: [PATCH] enable PROC_FILLSTAT --- proc/readproc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/proc/readproc.c b/proc/readproc.c index 83ef66aa..7289585e 100644 --- a/proc/readproc.c +++ b/proc/readproc.c @@ -404,9 +404,11 @@ next_proc: /* get next PID for consideration */ p->secsid = secsid; #endif - if ((file2str(path, "stat", sbuf, sizeof sbuf)) == -1) - goto next_proc; /* error reading /proc/#/stat */ - stat2proc(sbuf, p); /* parse /proc/#/stat */ + if (flags & PROC_FILLSTAT) { /* read, parse /proc/#/stat */ + if ((file2str(path, "stat", sbuf, sizeof sbuf)) == -1) + goto next_proc; /* error reading /proc/#/stat */ + stat2proc(sbuf, p); /* parse /proc/#/stat */ + } if (flags & PROC_FILLMEM) { /* read, parse /proc/#/statm */ if ((file2str(path, "statm", sbuf, sizeof sbuf)) != -1 )