summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2023-05-05 20:23:15 +0200
committercgzones <cgzones@googlemail.com>2024-04-06 19:42:28 +0200
commitb4d5b5cea98f557a856c89500dc169f511a2b817 (patch)
treeaa57a74027c0e3b9b91dc7d5ecd14bcab04d315b /Process.h
parenteb27a94ba411793aa1a25c331b3e1bb328739583 (diff)
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.
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Process.h b/Process.h
index 6a80bc51..066c1402 100644
--- a/Process.h
+++ b/Process.h
@@ -24,6 +24,13 @@ in the source distribution for its full text.
#define DEFAULT_HIGHLIGHT_SECS 5
+typedef enum Tristate_ {
+ TRI_INITIAL = 0,
+ TRI_OFF = -1,
+ TRI_ON = 1,
+} Tristate;
+
+
/* Core process states (shared by platforms)
* NOTE: The enum has an ordering that is important!
* See processStateChar in process.c for ProcessSate -> letter mapping */
@@ -106,7 +113,7 @@ typedef struct Process_ {
* - from file capabilities
* - inherited from the ambient set
*/
- bool elevated_priv;
+ Tristate elevated_priv;
/* Process runtime (in hundredth of a second) */
unsigned long long int time;

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