mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-16 13:39:36 +00:00
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
17 lines
470 B
Go
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()
|
|
}
|