summaryrefslogtreecommitdiffstats
path: root/ProcessList.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2010-11-20 20:27:37 +0000
committerHisham Muhammad <hisham@gobolinux.org>2010-11-20 20:27:37 +0000
commit10f007e07e90cd64ce322f7a1a7e4f9900ff7990 (patch)
treea4c01f1b0eee08b83f1469d1c88c38da8b1f5e74 /ProcessList.c
parent0ff54ebac98ed533237405aef627578751903d8d (diff)
Fix for systems where there's no /proc/PID/task/PID/. Closes #2789634.
Diffstat (limited to 'ProcessList.c')
-rw-r--r--ProcessList.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ProcessList.c b/ProcessList.c
index a958055e..cd265361 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -532,6 +532,9 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P
int pid;
// filename is a number: process directory
pid = atoi(name);
+
+ if (pid == parentPid)
+ continue;
// The RedHat kernel hides threads with a dot.
// I believe this is non-standard.
@@ -571,8 +574,7 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P
char subdirname[MAX_NAME+1];
snprintf(subdirname, MAX_NAME, "%s/%s/task", dirname, name);
- if (ProcessList_processEntries(this, subdirname, process, pid, period))
- continue;
+ ProcessList_processEntries(this, subdirname, process, pid, period);
}
#ifdef HAVE_TASKSTATS

© 2014-2024 Faster IT GmbH | imprint | privacy policy