Skip to content

Commit

Permalink
fix cannot kill all child process issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xiantang committed Jan 23, 2022
1 parent 6ddb809 commit 2f2aa39
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions runner/util_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ func (e *Engine) killCmd(cmd *exec.Cmd) (pid int, err error) {
func (e *Engine) startCmd(cmd string) (*exec.Cmd, io.WriteCloser, io.ReadCloser, io.ReadCloser, error) {
c := exec.Command("/bin/sh", "-c", cmd)
c.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
c.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}
stderr, err := c.StderrPipe()
if err != nil {
return nil, nil, nil, nil, err
Expand Down
4 changes: 0 additions & 4 deletions runner/util_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"io"
"os"
"os/exec"
"syscall"
"strconv"
"strings"
)
Expand All @@ -24,9 +23,6 @@ func (e *Engine) startCmd(cmd string) (*exec.Cmd, io.WriteCloser, io.ReadCloser,
}

c := exec.Command("cmd", "/c", cmd)
c.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}
stderr, err := c.StderrPipe()
if err != nil {
return nil, nil, nil, nil, err
Expand Down

0 comments on commit 2f2aa39

Please sign in to comment.