From 5e0f15d76b876a039d94dcd4c628cc38dc02a698 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 15 Oct 2025 22:09:33 +0900 Subject: hst/container: additional shim exit codes These are now considered stable, defined behaviour and can be used by external programs to determine shim outcome. Signed-off-by: Ophestra --- hst/container.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'hst') diff --git a/hst/container.go b/hst/container.go index 69909389..08fb8fa4 100644 --- a/hst/container.go +++ b/hst/container.go @@ -24,11 +24,18 @@ const ( IdentityMin = 0 // IdentityMax is the maximum value of [Config.Identity]. This is enforced by cmd/hsu. IdentityMax = 9999 +) + +const ( + // ShimExitFailure is returned if the container fails to start. + ShimExitFailure = iota + 1 + // ShimExitCancel is returned if the container is terminated by a shim-directed signal which cancels its context. + ShimExitCancel + // ShimExitOrphan is returned when the shim is orphaned before priv side delivers a signal. + ShimExitOrphan // ShimExitRequest is returned when the priv side process requests shim exit. ShimExitRequest = 254 - // ShimExitOrphan is returned when the shim is orphaned before priv side delivers a signal. - ShimExitOrphan = 3 ) const ( -- cgit v1.3.1