aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/osutil/osutil_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/osutil/osutil_linux.go')
-rw-r--r--pkg/osutil/osutil_linux.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/osutil/osutil_linux.go b/pkg/osutil/osutil_linux.go
index 35e5646fd..732d8e4c2 100644
--- a/pkg/osutil/osutil_linux.go
+++ b/pkg/osutil/osutil_linux.go
@@ -139,6 +139,12 @@ func setPdeathsig(cmd *exec.Cmd) {
cmd.SysProcAttr = new(syscall.SysProcAttr)
}
cmd.SysProcAttr.Pdeathsig = syscall.SIGKILL
+ // We will kill the whole process group.
+ cmd.SysProcAttr.Setpgid = true
+}
+
+func killPgroup(cmd *exec.Cmd) {
+ syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
}
func prolongPipe(r, w *os.File) {