summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcess.h
diff options
context:
space:
mode:
authorRin Cat (鈴猫) <dev@rincat.ch>2021-11-08 09:42:12 -0500
committerBenBE <BenBE@geshi.org>2021-11-09 19:04:25 +0100
commit07496eafb0166aafd9c33a6a95e16bcbc64c34d4 (patch)
tree1e9a9fbb942a4731d3bae5e6133d6372250bae90 /linux/LinuxProcess.h
parente7a8d14cbd7bbb896e64effed5bc6fb023777d36 (diff)
Linux: use proper way to detect kernel threads
Use PF_KTHREAD flag in /proc/[pid]/stat to detect kernel threads. This fixed an issue when a process's cmdline is empty, htop think it is a kernel thread.
Diffstat (limited to 'linux/LinuxProcess.h')
-rw-r--r--linux/LinuxProcess.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 577b903d..b4e1a8bf 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -48,6 +48,9 @@ typedef struct LinuxProcess_ {
long m_drs;
long m_lrs;
+ /* Process flags */
+ unsigned long int flags;
+
/* Data read (in bytes) */
unsigned long long io_rchar;

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