Compare commits

..

2 Commits

Author SHA1 Message Date
141bec290b
container: optionally isolate host abstract UNIX domain sockets via landlock
Some checks failed
Test / Sandbox (race detector) (push) Failing after 1m45s
Test / Sandbox (pull_request) Successful in 2m4s
Test / Sandbox (push) Successful in 2m20s
Test / Sandbox (race detector) (pull_request) Failing after 2m12s
Test / Hakurei (race detector) (push) Failing after 3m52s
Test / Hakurei (push) Failing after 20m54s
Test / Flake checks (push) Has been skipped
Test / Hpkg (push) Successful in 4m16s
Test / Create distribution (push) Failing after 32s
Test / Hpkg (pull_request) Successful in 3m12s
Test / Hakurei (race detector) (pull_request) Failing after 4m43s
Test / Hakurei (pull_request) Failing after 39m47s
Test / Flake checks (pull_request) Has been skipped
Test / Create distribution (pull_request) Failing after 29s
2025-08-17 17:36:51 +09:00
c72a35ef72
container: start from locked thread
Some checks failed
Test / Sandbox (push) Successful in 2m28s
Test / Hakurei (race detector) (push) Failing after 2m52s
Test / Hakurei (push) Successful in 3m21s
Test / Hpkg (push) Successful in 4m27s
Test / Create distribution (push) Successful in 34s
Test / Flake checks (push) Has been skipped
Test / Sandbox (race detector) (push) Failing after 1m44s
This allows setup that relies on per-thread state like securebits and landlock, from the parent side.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-17 17:36:18 +09:00

View File

@ -235,6 +235,10 @@ func (p *Container) Serve() error {
// Wait waits for the container init process to exit and releases any resources associated with the [Container].
func (p *Container) Wait() error {
if p.wait == nil {
if p.cmd != nil {
// pass through error from Cmd
return p.cmd.Wait()
}
return EINVAL
}
defer func() { close(p.wait); p.cancel(); p.wait = nil }()