Skip to content

Commit d8fb379

Browse files
author
gitopia1c2zfrmhra3spfrc2m5ft64hef30guf60lvtcm3
committed
Merge pull request #8 from git-remote-gitopia/fix-windows-build
2 parents 3641383 + 8d58794 commit d8fb379

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/util.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"os"
66
"os/exec"
77
"path"
8-
"syscall"
98
)
109

1110
func GetLocalDir() (string, error) {
@@ -22,7 +21,6 @@ func GetLocalDir() (string, error) {
2221

2322
func GitCommand(name string, args ...string) (*exec.Cmd, io.Reader) {
2423
cmd := exec.Command(name, args...)
25-
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
2624
cmd.Env = os.Environ()
2725

2826
r, _ := cmd.StdoutPipe()
@@ -37,8 +35,8 @@ func CleanUpProcessGroup(cmd *exec.Cmd) {
3735
}
3836

3937
process := cmd.Process
40-
if process != nil && process.Pid > 0 {
41-
syscall.Kill(-process.Pid, syscall.SIGTERM)
38+
if process != nil {
39+
process.Signal(os.Kill)
4240
}
4341

4442
go cmd.Wait()

0 commit comments

Comments
 (0)