diff options
author | valdaarhun <icegambit91@gmail.com> | 2022-08-07 00:07:02 +0530 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2022-08-29 19:19:35 +0200 |
commit | a52f6d43542e66b0426e02b6af3589185c29335b (patch) | |
tree | 1f6b3b3166b2e0947beb9ad5739be0c26c67aa9d /Action.c | |
parent | d078ba15a234228898f1683a2c22eb90ba446a4d (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |