connhelper: export functions for other projects

Exposed functions are planned to be used by `buildctl`:
https://github.com/moby/buildkit/issues/769

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2019-03-01 23:34:36 +09:00
parent ee94f72e2c
commit dbe7afbd04
8 changed files with 318 additions and 301 deletions

View File

@ -0,0 +1,12 @@
package commandconn
import (
"os/exec"
"syscall"
)
func setPdeathsig(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{
Pdeathsig: syscall.SIGKILL,
}
}