提交 15b7c6e5 编写于 作者: D Derek Parker

Send kill signal to process group on Linux

上级 544c4ccc
...@@ -66,7 +66,7 @@ func (dbp *Process) Kill() (err error) { ...@@ -66,7 +66,7 @@ func (dbp *Process) Kill() (err error) {
if !stopped(dbp.Pid) { if !stopped(dbp.Pid) {
return errors.New("process must be stopped in order to kill it") return errors.New("process must be stopped in order to kill it")
} }
err = sys.Kill(dbp.Pid, sys.SIGKILL) err = sys.Kill(-dbp.Pid, sys.SIGKILL)
if err != nil { if err != nil {
return errors.New("could not deliver signal " + err.Error()) return errors.New("could not deliver signal " + err.Error())
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册