2019-07-03 09:04:28 +00:00
|
|
|
// +build !windows
|
|
|
|
|
|
|
|
package runner
|
|
|
|
|
2019-07-10 07:16:45 +00:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"os/exec"
|
|
|
|
)
|
2019-07-03 09:04:28 +00:00
|
|
|
|
|
|
|
func backgroundCmd(cmd *exec.Cmd) {
|
|
|
|
}
|
2019-07-10 07:16:45 +00:00
|
|
|
|
|
|
|
func kill(pid int) error {
|
|
|
|
p, err := os.FindProcess(pid)
|
|
|
|
// already died
|
|
|
|
if nil != err {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return p.Kill()
|
|
|
|
}
|