Files
RemoteCompilation/server/process_unix.go
T

21 lines
407 B
Go

//go:build !windows
package main
import (
"os/exec"
"path/filepath"
"syscall"
)
func gradleCommand(work, task string) *exec.Cmd {
c := exec.Command("sh", filepath.Join(work, "gradlew"), task, "--console=plain", "--no-daemon")
c.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
return c
}
func killTree(c *exec.Cmd) {
if c.Process != nil {
_ = syscall.Kill(-c.Process.Pid, syscall.SIGKILL)
}
}