Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
10f007e0
Commit
10f007e0
authored
Nov 20, 2010
by
Hisham Muhammad
Browse files
Fix for systems where there's no /proc/PID/task/PID/. Closes #2789634.
parent
0ff54eba
Changes
1
Hide whitespace changes
Inline
Side-by-side
ProcessList.c
View file @
10f007e0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment