forked from coop-cloud/abra
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:
parent
0e0e2db755
commit
de7054fd74
@ -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
|
||||
|
10
pkg/upstream/commandconn/pdeathsig_linux.go
Normal file
10
pkg/upstream/commandconn/pdeathsig_linux.go
Normal file
@ -0,0 +1,10 @@
|
||||
package commandconn
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func setPdeathsig(cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr.Pdeathsig = syscall.SIGKILL
|
||||
}
|
11
pkg/upstream/commandconn/pdeathsig_nolinux.go
Normal file
11
pkg/upstream/commandconn/pdeathsig_nolinux.go
Normal file
@ -0,0 +1,11 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package commandconn
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func setPdeathsig(cmd *exec.Cmd) {
|
||||
}
|
Loading…
Reference in New Issue
Block a user