We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ca92cd commit ead1c47Copy full SHA for ead1c47
cmd_windows.go
@@ -16,5 +16,8 @@ func terminateProcess(pid int) error {
16
}
17
18
func setProcessGroupID(cmd *exec.Cmd) {
19
- cmd.SysProcAttr = &syscall.SysProcAttr{}
+ // Set create new process group so the cmd and all its children become a new
20
+ // process group. This allows Stop to SIGTERM the cmd's process group
21
+ // without killing this process (i.e. this code here).
22
+ cmd.SysProcAttr = &syscall.SysProcAttr{CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP}
23
0 commit comments