MCPcopy Create free account
hub / github.com/codehamr/codehamr / reExec

Function reExec

cmd/codehamr/reexec_unix.go:12–14  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

10// surfaces as the error. Windows lacks execve and uses a spawn-and-wait
11// fallback for the same effect.
12func reExec(exe string, args []string, env []string) error {
13 return syscall.Exec(exe, args, env)
14}

Callers 1

maybeSelfUpdateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected