github.com/secure-build/gitlab-runner@v12.5.0+incompatible/helpers/process_group_windows.go (about) 1 package helpers 2 3 import ( 4 "os/exec" 5 "strconv" 6 ) 7 8 func SetProcessGroup(cmd *exec.Cmd) { 9 } 10 11 func KillProcessGroup(cmd *exec.Cmd) { 12 if cmd == nil || cmd.Process == nil { 13 return 14 } 15 16 exec.Command("taskkill", "/F", "/T", "/PID", strconv.Itoa(cmd.Process.Pid)).Run() 17 cmd.Process.Kill() 18 }