diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-15 22:09:33 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-15 22:09:33 +0900 |
| commit | 5e0f15d76b876a039d94dcd4c628cc38dc02a698 (patch) | |
| tree | 0d9e7b11833abaf9c0ea128cfe6af5b74e492731 /hst/container.go | |
| parent | ae65491223a460b0a902993ac81ac91ca69c91fa (diff) | |
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>
Diffstat (limited to 'hst/container.go')
| -rw-r--r-- | hst/container.go | 11 |
1 files changed, 9 insertions, 2 deletions
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 ( |
