mirror of https://github.com/xzeldon/htop.git
Avoid reading process IO info multiple times on multithreaded processes.
Bugfix from Gerhard Heift.
This commit is contained in:
parent
a5dfaa2393
commit
c3550e18e8
|
@ -565,10 +565,6 @@ static bool ProcessList_processEntries(ProcessList* this, char* dirname, Process
|
||||||
process->tgid = parent->pid;
|
process->tgid = parent->pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_TASKSTATS
|
|
||||||
ProcessList_readIoFile(this, process, dirname, name);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (showUserlandThreads && (!parent || pid != parent->pid)) {
|
if (showUserlandThreads && (!parent || pid != parent->pid)) {
|
||||||
char subdirname[MAX_NAME+1];
|
char subdirname[MAX_NAME+1];
|
||||||
snprintf(subdirname, MAX_NAME, "%s/%s/task", dirname, name);
|
snprintf(subdirname, MAX_NAME, "%s/%s/task", dirname, name);
|
||||||
|
@ -577,6 +573,10 @@ static bool ProcessList_processEntries(ProcessList* this, char* dirname, Process
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_TASKSTATS
|
||||||
|
ProcessList_readIoFile(this, process, dirname, name);
|
||||||
|
#endif
|
||||||
|
|
||||||
process->updated = true;
|
process->updated = true;
|
||||||
|
|
||||||
if (!existingProcess)
|
if (!existingProcess)
|
||||||
|
|
Loading…
Reference in New Issue