Pulse/scripts/installtests/python_fixture_process_windows_test.go
pulse-triage[bot] 9726539199 Bound Python installer controls and clean owned process groups
Keep every control and its existing deadline while stopping its POSIX group on cancellation and bounding inherited-output drainage. Retain direct-process Windows cancellation without claiming tree cleanup. Cover discovery and execution, held pipes, owned-child termination and unrelated Python liveness; include the helper files in source custody.

Contract-Neutral: Test-only fixture process ownership and output observation; no installer, runtime, service, platform or public contract change.
Change-source: pulse-maintainer
2026-11-11 03:42:48 +00:00

17 lines
470 B
Go

package installtests
import (
"context"
"os"
"os/exec"
"time"
)
// Retain Windows' existing direct-process cancellation. POSIX process-group
// ownership is not a Windows tree-cleanup claim. Pipe drainage is still bounded.
func pythonFixtureOutput(ctx context.Context, args, env []string) ([]byte, error) {
cmd := exec.CommandContext(ctx, "python3", args...)
cmd.Env = append(os.Environ(), env...)
cmd.WaitDelay = 2 * time.Second
return cmd.CombinedOutput()
}