diff --git a/internal/pkg/process/killer_unix_test.go b/internal/pkg/process/killer_unix_test.go index 9fa859ad..e1fef639 100644 --- a/internal/pkg/process/killer_unix_test.go +++ b/internal/pkg/process/killer_unix_test.go @@ -104,7 +104,7 @@ func TestTreeKillCancelBeforeCaptureKillsTree(t *testing.T) { require.NoError(t, err) t.Cleanup(func() { _ = stdin.Close() }) t.Cleanup(func() { _ = input.Close() }) - cmd := exec.CommandContext(t.Context(), "/bin/sh", "-c", "cat <&0 & echo $!; read value") + cmd := exec.CommandContext(t.Context(), "/bin/sh", "-c", "exec 3<&0; cat <&3 & echo $!; read value") cmd.Stdin = stdin cmd.SysProcAttr = SysProcAttr("", false) output, err := cmd.StdoutPipe()