pub fn zexecve(pth: &str, argv: &[String], newenvp: Option<&[String]>) -> i32Expand description
Port of static int zexecve(char *pth, char **argv, char **newenvp)
from Src/exec.c:504. Wraps execve(2) with:
$_env var stamped to absolutepth(c:514-520)- winch signal unblock right before the syscall (c:527)
- on
ENOEXEC/ENOENT: reads the first POUNDBANGLIMIT bytes, parses a#!interp argshebang and re-execs the interpreter (c:534-628). ForENOEXECwith no shebang, binary-safety check then falls back to/bin/sh scriptper POSIX (c:588-628).
Returns errno from the failing exec — execve only returns on
failure, so success means the calling process is already replaced.