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 <cat@gensokyo.uk>
This commit is contained in:
2025-10-15 22:09:33 +09:00
parent ae65491223
commit 5e0f15d76b
3 changed files with 19 additions and 11 deletions

View File

@@ -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 (