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.
2 parents 3641383 + 8d58794 commit d8fb379Copy full SHA for d8fb379
core/util.go
@@ -5,7 +5,6 @@ import (
5
"os"
6
"os/exec"
7
"path"
8
- "syscall"
9
)
10
11
func GetLocalDir() (string, error) {
@@ -22,7 +21,6 @@ func GetLocalDir() (string, error) {
22
21
23
func GitCommand(name string, args ...string) (*exec.Cmd, io.Reader) {
24
cmd := exec.Command(name, args...)
25
- cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
26
cmd.Env = os.Environ()
27
28
r, _ := cmd.StdoutPipe()
@@ -37,8 +35,8 @@ func CleanUpProcessGroup(cmd *exec.Cmd) {
37
35
}
38
36
39
process := cmd.Process
40
- if process != nil && process.Pid > 0 {
41
- syscall.Kill(-process.Pid, syscall.SIGTERM)
+ if process != nil {
+ process.Signal(os.Kill)
42
43
44
go cmd.Wait()
0 commit comments