Linux: gather permitted capabilities via capget(2)
#1211 has shown reading /proc/<pid>/status might have a significant
performance impact. It was started to be read by default to gather the
permitted capabilities of the process.
Gather permitted capabilities via the syscall capget(2) instead.
cap_get_proc(3) is not used to avoid linking with -lcap.
diff --git a/Process.c b/Process.c
index c343e77..527fc20 100644
--- a/Process.c
+++ b/Process.c
@@ -736,7 +736,7 @@
}
break;
case USER:
- if (this->elevated_priv)
+ if (this->elevated_priv == TRI_ON)
attr = CRT_colors[PROCESS_PRIV];
else if (host->htopUserId != this->st_uid)
attr = CRT_colors[PROCESS_SHADOW];