aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-08 22:58:42 +0900
committerOphestra <cat@gensokyo.uk>2025-12-08 22:58:42 +0900
commite9fb1d7be540794ebe5027a08fbf97df189c6787 (patch)
tree6447dcdd7165fb2cb61dd1b46e47238d93bb54a7 /container/dispatcher.go
parentdafe9f8efc46bbd0fb391d1f7a93f05ee9751250 (diff)
container/initdaemon: copy wstatus from wait4 loop
Due to the special nature of the init process, direct use of wait outside the wait4 loop is racy. This change copies the wstatus from wait4 loop state instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher.go')
-rw-r--r--container/dispatcher.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/container/dispatcher.go b/container/dispatcher.go
index e58346e8..e1dae6eb 100644
--- a/container/dispatcher.go
+++ b/container/dispatcher.go
@@ -68,8 +68,6 @@ type syscallDispatcher interface {
notify(c chan<- os.Signal, sig ...os.Signal)
// start starts [os/exec.Cmd].
start(c *exec.Cmd) error
- // wait waits on [os/exec.Cmd].
- wait(c *exec.Cmd) error
// signal signals the underlying process of [os/exec.Cmd].
signal(c *exec.Cmd, sig os.Signal) error
// evalSymlinks provides [filepath.EvalSymlinks].
@@ -172,7 +170,6 @@ func (direct) seccompLoad(rules []std.NativeRule, flags seccomp.ExportFlag) erro
}
func (direct) notify(c chan<- os.Signal, sig ...os.Signal) { signal.Notify(c, sig...) }
func (direct) start(c *exec.Cmd) error { return c.Start() }
-func (direct) wait(c *exec.Cmd) error { return c.Wait() }
func (direct) signal(c *exec.Cmd, sig os.Signal) error { return c.Process.Signal(sig) }
func (direct) evalSymlinks(path string) (string, error) { return filepath.EvalSymlinks(path) }