Download internal/shell/exec_windows.go from SaylorTwift/crush: direct link, hf CLI and curl.
- Browser
- Download file 638 Bytes
-
https://huggingface.co/SaylorTwift/crush/resolve/main/internal/shell/exec_windows.go
- Command line
-
hf download hf://SaylorTwift/crush/internal/shell/exec_windows.go
-
curl -L -o exec_windows.go https://huggingface.co/SaylorTwift/crush/resolve/main/internal/shell/exec_windows.go
638 Bytes
| //go:build windows | |
| package shell | |
| import ( | |
| "os/exec" | |
| "time" | |
| "mvdan.cc/sh/v3/interp" | |
| ) | |
| // defaultKillTimeout matches mvdan's DefaultExecHandler default. | |
| const defaultKillTimeout = 2 * time.Second | |
| // isolateProcess is a no-op on Windows. Session isolation via Setsid is a | |
| // Unix-only concept; Windows uses CREATE_NEW_PROCESS_GROUP which mvdan's | |
| // default handler already handles adequately. | |
| func isolateProcess(_ *exec.Cmd) {} | |
| // processGroupExecHandler returns interp.DefaultExecHandler on Windows. | |
| func processGroupExecHandler(killTimeout time.Duration) interp.ExecHandlerFunc { | |
| return interp.DefaultExecHandler(killTimeout) | |
| } | |