26f897c1ec
release / release-please (push) Failing after 1m49s
docs / build (push) Failing after 6m34s
release / build-and-upload (arm64, linux) (push) Has been cancelled
release / build-and-upload (arm64, windows) (push) Has been cancelled
release / build-darwin (amd64, darwin) (push) Has been cancelled
release / checksums (push) Has been cancelled
release / finalize (push) Has been cancelled
release / build-darwin (arm64, darwin) (push) Has been cancelled
release / build-and-upload (amd64, linux) (push) Has been cancelled
release / build-and-upload (amd64, windows) (push) Has been cancelled
docs / deploy (push) Has been cancelled
22 lines
817 B
Go
22 lines
817 B
Go
//go:build !unix && !windows
|
|
|
|
package shellenv
|
|
|
|
import "os/exec"
|
|
|
|
// ConfigureShellCommand is a no-op on platforms that lack process groups
|
|
// (and a process-tree kill primitive). Context cancellation falls back to the
|
|
// exec.CommandContext default of terminating the direct child only.
|
|
func ConfigureShellCommand(cmd *exec.Cmd) {}
|
|
|
|
// StartShellCommand starts cmd on platforms without extra process-tree setup.
|
|
// It exists so call sites can use the same lifecycle helpers on every platform.
|
|
func StartShellCommand(cmd *exec.Cmd) error {
|
|
return cmd.Start()
|
|
}
|
|
|
|
// TerminateShellCommandGroup is a no-op on platforms without a process-tree kill
|
|
// primitive, mirroring ConfigureShellCommand. The reap-the-group-on-exit
|
|
// guarantee is best-effort and platform-gated.
|
|
func TerminateShellCommandGroup(cmd *exec.Cmd) {}
|