mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-25 23:35:45 +00:00
Fix for systems where there's no /proc/PID/task/PID/. Closes #2789634.
This commit is contained in:
parent
0ff54ebac9
commit
10f007e07e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user