Compare commits

..

2 Commits

Author SHA1 Message Date
9eb6bc71c4
container: optionally isolate host abstract UNIX domain sockets via landlock
Some checks failed
Test / Hakurei (race detector) (pull_request) Failing after 41m38s
Test / Flake checks (pull_request) Has been skipped
Test / Hpkg (push) Successful in 4m16s
Test / Hpkg (pull_request) Successful in 3m27s
Test / Sandbox (race detector) (pull_request) Successful in 4m1s
Test / Sandbox (race detector) (push) Successful in 4m36s
Test / Create distribution (push) Failing after 32s
Test / Hakurei (pull_request) Failing after 20m33s
Test / Hakurei (race detector) (push) Failing after 22m25s
Test / Sandbox (push) Successful in 2m20s
Test / Sandbox (pull_request) Successful in 2m14s
Test / Create distribution (pull_request) Failing after 28s
Test / Hakurei (push) Failing after 39m36s
Test / Flake checks (push) Has been skipped
2025-08-17 17:44:14 +09:00
0ac6e99818
container: start from locked thread
All checks were successful
Test / Hpkg (push) Successful in 4m14s
Test / Create distribution (push) Successful in 33s
Test / Sandbox (race detector) (push) Successful in 4m28s
Test / Hakurei (race detector) (push) Successful in 5m12s
Test / Flake checks (push) Successful in 1m33s
Test / Sandbox (push) Successful in 2m10s
Test / Hakurei (push) Successful in 3m17s
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:42:22 +09:00

View File

@ -234,15 +234,16 @@ 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()
}
if p.cmd == nil {
return EINVAL
}
defer func() { close(p.wait); p.cancel(); p.wait = nil }()
return p.cmd.Wait()
err := p.cmd.Wait()
p.cancel()
if p.wait != nil && err == nil {
close(p.wait)
}
return err
}
func (p *Container) String() string {