pub fn execveat<SA: AsRef<CStr>, SE: AsRef<CStr>>(
dirfd: RawFd,
pathname: &CStr,
args: &[SA],
env: &[SE],
flags: AtFlags,
) -> Result<Infallible>
Expand description
Execute program relative to a directory file descriptor (see execveat(2)).
The execveat
function allows for another process to be “called” which will
replace the current process image. That is, this process becomes the new
command that is run. On success, this function will not return. Instead,
the new program will run until it exits.
This function is similar to execve
, except that the program to be executed
is referenced as a file descriptor to the base directory plus a path.