fix: use x-platform code for pdeathsig

This might cause the macosx build not to fail, I hope.

See https://github.com/docker/cli/tree/v20.10.10/cli/connhelper/commandconn
This commit is contained in:
decentral1se 2021-11-03 09:57:35 +01:00
parent 0e0e2db755
commit de7054fd74
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 21 additions and 4 deletions

View File

@ -32,10 +32,6 @@ import (
exec "golang.org/x/sys/execabs"
)
func setPdeathsig(cmd *exec.Cmd) {
cmd.SysProcAttr.Pdeathsig = syscall.SIGKILL
}
func createSession(cmd *exec.Cmd) {
// for supporting ssh connection helper with ProxyCommand
// https://github.com/docker/cli/issues/1707

View File

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

View File

@ -0,0 +1,11 @@
//go:build !linux
// +build !linux
package commandconn
import (
"os/exec"
)
func setPdeathsig(cmd *exec.Cmd) {
}