diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-01-09 23:07:27 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2024-04-06 19:42:28 +0200 |
commit | 22d25db4678b844842af516c0f2d117382f7c632 (patch) | |
tree | b4c205edd56574f7a829c22962503366e3a230c6 /Process.h | |
parent | 76a13dbb4ea82c0a22c8d3a74476b9446aa91a0b (diff) |
Linux: detect container process by different PID namespace
Container engines like docker and podman rely on Linux namespaces. If
available check if the target process is inside a different PID
namespace than htop. This check will mark sandbox'ed applications, e.g.
under bubblewrap, but not light-wight containers, like distrobox.
Diffstat (limited to 'Process.h')
-rw-r--r-- | Process.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -94,7 +94,7 @@ typedef struct Process_ { bool isUserlandThread; /* This process is running inside a container */ - bool isRunningInContainer; + Tristate isRunningInContainer; /* Controlling terminal identifier of the process */ unsigned long int tty_nr; |