reExec replaces the process image via execve(2). Same PID, so the parent shell waits on one process throughout, one continuous session. Success never returns; only exec failure (missing binary, wrong arch, no exec bit) surfaces as the error. Windows lacks execve and uses a spawn-and-wait fallback fo
(exe string, args []string, env []string)
| 10 | // surfaces as the error. Windows lacks execve and uses a spawn-and-wait |
| 11 | // fallback for the same effect. |
| 12 | func reExec(exe string, args []string, env []string) error { |
| 13 | return syscall.Exec(exe, args, env) |
| 14 | } |