summaryrefslogtreecommitdiffstats
path: root/Action.c
diff options
context:
space:
mode:
authorvaldaarhun <icegambit91@gmail.com>2022-08-07 00:07:02 +0530
committercgzones <cgzones@googlemail.com>2022-08-29 19:19:35 +0200
commita52f6d43542e66b0426e02b6af3589185c29335b (patch)
tree1f6b3b3166b2e0947beb9ad5739be0c26c67aa9d /Action.c
parentd078ba15a234228898f1683a2c22eb90ba446a4d (diff)
Implement LinuxProcessList_checkPidNamespace
Add actionToggle and fix LinuxProcessList_checkPidNamespace Read cgroup file irrespective of flags Improve logic to check if running in container Add isContainerOrVMSlice() Also change "(Process *)lp" to "proc" Remove check for root slice Remove Process_isRunningInContainer Co-authored-by: BenBE <BenBE@geshi.org>
Diffstat (limited to 'Action.c')
-rw-r--r--Action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Action.c b/Action.c
index ffc4a893..1007be2f 100644
--- a/Action.c
+++ b/Action.c
@@ -221,6 +221,11 @@ static Htop_Reaction actionToggleUserlandThreads(State* st) {
return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
}
+static Htop_Reaction actionToggleRunningInContainer(State* st){
+ st->settings->hideRunningInContainer = !st->settings->hideRunningInContainer;
+ return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS | HTOP_KEEP_FOLLOWING;
+}
+
static Htop_Reaction actionToggleProgramPath(State* st) {
st->settings->showProgramPath = !st->settings->showProgramPath;
return HTOP_REFRESH | HTOP_SAVE_SETTINGS;
@@ -752,6 +757,7 @@ void Action_setBindings(Htop_Action* keys) {
keys['K'] = actionToggleKernelThreads;
keys['M'] = actionSortByMemory;
keys['N'] = actionSortByPID;
+ keys['O'] = actionToggleRunningInContainer;
keys['P'] = actionSortByCPU;
keys['S'] = actionSetup;
keys['T'] = actionSortByTime;

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