From a37a89f4dbbb9bf2e30a39cf37c654852f755219 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 3 Aug 2021 19:28:48 -0700 Subject: [PATCH] libct/system: add I and P process states Those states are available since Linux 4.14 (kernel commits 8ef9925b02c23e3838d5 and 06eb61844d841d003). Before this patch, they were shown as unknown. This is mostly cosmetical. Note that I is described in /proc/pid/status as just "idle", although elsewhere it says it's an idle kernel thread. Let's have it as "idle" for brevity. Signed-off-by: Kir Kolyshkin --- libcontainer/system/proc.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libcontainer/system/proc.go b/libcontainer/system/proc.go index ef9ebcb06..8f0a68afd 100644 --- a/libcontainer/system/proc.go +++ b/libcontainer/system/proc.go @@ -19,6 +19,8 @@ const ( // Only values for Linux 3.14 and later are listed here Stopped State = 'T' TracingStop State = 't' Zombie State = 'Z' + Parked State = 'P' + Idle State = 'I' ) // String forms of the state from proc(5)'s documentation for @@ -39,6 +41,10 @@ func (s State) String() string { return "tracing stop" case Zombie: return "zombie" + case Parked: + return "parked" + case Idle: + return "idle" // kernel thread default: return fmt.Sprintf("unknown (%c)", s) }