Commit 7dd971e3 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Linux: fix thread flags

parent 3449cf33
Showing with 1 addition and 1 deletion
+1 -1
......@@ -936,6 +936,7 @@ bool Process_update(Process* proc, bool isNew, ProcessList* pl, ProcessScanData*
proc->percent_mem = (proc->m_resident * PAGE_SIZE_KB) / (double)(pl->totalMem) * 100.0;
if(isNew) {
proc->tgid = lpsd->mainProcess ? lpsd->mainProcess : proc->pid;
proc->threadFlags = ((proc->pgrp == 0) ? PROCESS_KERNEL_THREAD : 0)
| ((proc->pid != proc->tgid) ? PROCESS_USERLAND_THREAD : 0);
......@@ -955,7 +956,6 @@ bool Process_update(Process* proc, bool isNew, ProcessList* pl, ProcessScanData*
if (! LinuxProcess_readCmdlineFile(proc, dirname, name)) {
return false;
}
proc->tgid = lpsd->mainProcess ? lpsd->mainProcess : proc->pid;
} else {
if (settings->updateProcessNames && proc->state != 'Z') {
if (! LinuxProcess_readCmdlineFile(proc, dirname, name)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment