Go exec function
Execute a program, causing the program that is currently being run to be replaced with a new program
The following
func execv(cmd string, args ...string) error {
path, err := exec.LookPath(cmd)
if err != nil {
return err
}
return syscall.Exec(
path,
append([]string{cmd}, args...),
syscall.Environ())
}
is the Go equivilent of the C execv
function!