From f7bd28118c4ac34a9a444073b31ca8f2579188f3 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 29 Jul 2025 03:06:49 +0900 Subject: hst: configurable wait delay This is useful for programs that take a long time to clean up. Signed-off-by: Ophestra --- internal/app/seal_linux.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/app/seal_linux.go') diff --git a/internal/app/seal_linux.go b/internal/app/seal_linux.go index 40c68c1b..13257211 100644 --- a/internal/app/seal_linux.go +++ b/internal/app/seal_linux.go @@ -15,6 +15,7 @@ import ( "strings" "sync/atomic" "syscall" + "time" "hakurei.app/container" "hakurei.app/hst" @@ -79,6 +80,7 @@ type outcome struct { sys *system.I ctx context.Context + waitDelay time.Duration container *container.Params env map[string]string sync *os.File @@ -281,6 +283,7 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *hst.Co var uid, gid int var err error seal.container, seal.env, err = newContainer(config.Container, sys, &uid, &gid) + seal.waitDelay = config.Container.WaitDelay if err != nil { return hlog.WrapErrSuffix(err, "cannot initialise container configuration:") -- cgit v1.3.1