mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Fix log/reap reexec
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
254d2f696e
commit
df033fa248
@ -58,7 +58,7 @@ func forkIfLoggingOrReaping() error {
|
||||
args := append([]string{version.Program}, os.Args[1:]...)
|
||||
env := append(os.Environ(), "_K3S_LOG_REEXEC_=true", "NOTIFY_SOCKET=")
|
||||
cmd := &exec.Cmd{
|
||||
Path: os.Args[0],
|
||||
Path: "/proc/self/exe",
|
||||
Dir: pwd,
|
||||
Args: args,
|
||||
Env: env,
|
||||
@ -66,7 +66,7 @@ func forkIfLoggingOrReaping() error {
|
||||
Stdout: stdout,
|
||||
Stderr: stderr,
|
||||
SysProcAttr: &syscall.SysProcAttr{
|
||||
Setsid: true,
|
||||
Pdeathsig: unix.SIGTERM,
|
||||
},
|
||||
}
|
||||
if err := cmd.Start(); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user