Skip to content

Commit

Permalink
Fix log/reap reexec
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Nov 1, 2021
1 parent 6223e3e commit 2f3d398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cli/cmds/log_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ 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,
Stdin: os.Stdin,
Stdout: stdout,
Stderr: stderr,
SysProcAttr: &syscall.SysProcAttr{
Setsid: true,
Pdeathsig: unix.SIGTERM,
},
}
if err := cmd.Start(); err != nil {
Expand Down

0 comments on commit 2f3d398

Please sign in to comment.