mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Remove Pdeathsig code because it doesn't do what was intended
Pdeathsig is applied to the process we are starting, so that will get killed if the e2e_node process dies, which isn't what we need.
This commit is contained in:
parent
a8d7e93d66
commit
e5e7b60e9a
@ -26,7 +26,6 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
@ -284,18 +283,6 @@ func (es *e2eService) startServer(cmd *healthCheckCommand) error {
|
|||||||
cmd.Cmd.Stdout = outfile
|
cmd.Cmd.Stdout = outfile
|
||||||
cmd.Cmd.Stderr = outfile
|
cmd.Cmd.Stderr = outfile
|
||||||
|
|
||||||
// Killing the sudo command should kill the server as well.
|
|
||||||
attrs := &syscall.SysProcAttr{}
|
|
||||||
// Hack to set linux-only field without build tags.
|
|
||||||
deathSigField := reflect.ValueOf(attrs).Elem().FieldByName("Pdeathsig")
|
|
||||||
if deathSigField.IsValid() {
|
|
||||||
deathSigField.Set(reflect.ValueOf(syscall.SIGKILL))
|
|
||||||
} else {
|
|
||||||
cmdErrorChan <- fmt.Errorf("Failed to set Pdeathsig field (non-linux build)")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
cmd.Cmd.SysProcAttr = attrs
|
|
||||||
|
|
||||||
// Run the command
|
// Run the command
|
||||||
err = cmd.Run()
|
err = cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user