From e9fb1d7be540794ebe5027a08fbf97df189c6787 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 8 Dec 2025 22:58:42 +0900 Subject: 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 --- container/dispatcher_test.go | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'container/dispatcher_test.go') diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go index bbcb26ad..834c700d 100644 --- a/container/dispatcher_test.go +++ b/container/dispatcher_test.go @@ -493,21 +493,6 @@ func (k *kstub) start(c *exec.Cmd) error { return err } -func (k *kstub) wait(c *exec.Cmd) error { - k.Helper() - expect := k.Expects("wait") - err := expect.Error( - stub.CheckArg(k.Stub, "c.Path", c.Path, 0), - stub.CheckArgReflect(k.Stub, "c.Args", c.Args, 1), - stub.CheckArgReflect(k.Stub, "c.Env", c.Env, 2), - stub.CheckArg(k.Stub, "c.Dir", c.Dir, 3)) - - if mgc, ok := expect.Ret.(uintptr); ok && mgc == stub.PanicExit { - panic(stub.PanicExit) - } - return err -} - func (k *kstub) signal(c *exec.Cmd, sig os.Signal) error { k.Helper() expect := k.Expects("signal") -- cgit v1.3.1