pub fn execvp<S, I>(program: S, args: I) -> Error
Expand description
Run program
with args
, completely replacing the currently running
program. If it returns at all, it always returns an error.
Note that program
and the first element of args
will normally be
identical. The former is the program we ask the operating system to
run, and the latter is the value that will show up in argv[0]
when
the program executes. On POSIX systems, these can technically be
completely different, and we’ve perserved that much of the low-level
API here.
§Examples
let err = exec::execvp("echo", &["echo", "foo"]);
println!("Error: {}", err);