From 2eb3b1129bf73f8e2a0b46683af3139498fa89fd Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 14 Oct 2026 18:23:45 +0900 Subject: hst: pass through adopt wait delay with bounds This is a useful value to customise, primarily useful for test suites but can also generally improve exit latency for stubborn applications. Signed-off-by: Ophestra --- internal/outcome/outcome.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/outcome/outcome.go') diff --git a/internal/outcome/outcome.go b/internal/outcome/outcome.go index 414b421f..19ca9c7b 100644 --- a/internal/outcome/outcome.go +++ b/internal/outcome/outcome.go @@ -6,6 +6,7 @@ import ( "errors" "maps" "strconv" + "time" "hakurei.app/check" "hakurei.app/container" @@ -125,6 +126,14 @@ func newOutcomeState(k syscallDispatcher, msg message.Msg, id *hst.ID, config *h s.Shim.WaitDelay = s.Container.WaitDelay } + if s.Container.AdoptWaitDelay > 5*time.Second { + s.Shim.AdoptWaitDelay = 5 * time.Second + } else if s.Container.AdoptWaitDelay < 0 { + s.Shim.AdoptWaitDelay = -1 + } else { + s.Shim.AdoptWaitDelay = s.Container.AdoptWaitDelay + } + if s.Container.Flags&hst.FMapRealUID != 0 { s.Mapuid, s.Mapgid = k.getuid(), k.getgid() } else { -- cgit v1.3.1