aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/seal_linux.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-29 03:06:49 +0900
committerOphestra <cat@gensokyo.uk>2025-07-29 03:06:49 +0900
commitf7bd28118c4ac34a9a444073b31ca8f2579188f3 (patch)
treed094700b4d367250e9de16226cc7cc49a0dc3b55 /internal/app/seal_linux.go
parent940ee00ffee9208a244a99ff085a981c1af1d7c4 (diff)
hst: configurable wait delay
This is useful for programs that take a long time to clean up. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/seal_linux.go')
-rw-r--r--internal/app/seal_linux.go3
1 files changed, 3 insertions, 0 deletions
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:")