on 175ce34 help sign in
crush/internal/shell/exec_windows.go
23 lines 638 B history raw
1//go:build windows
3package shell
5import (
6 "os/exec"
7 "time"
9 "mvdan.cc/sh/v3/interp"
12// defaultKillTimeout matches mvdan's DefaultExecHandler default.
13const defaultKillTimeout = 2 * time.Second
15// isolateProcess is a no-op on Windows. Session isolation via Setsid is a
16// Unix-only concept; Windows uses CREATE_NEW_PROCESS_GROUP which mvdan's
17// default handler already handles adequately.
18func isolateProcess(_ *exec.Cmd) {}
20// processGroupExecHandler returns interp.DefaultExecHandler on Windows.
21func processGroupExecHandler(killTimeout time.Duration) interp.ExecHandlerFunc {
22 return interp.DefaultExecHandler(killTimeout)