4 ms·
It will use `execvp` (which automatically reads the PATH variable, no shell required) if you use features that require it (like `before_exec` which runs a block
by johncolanduoni 8y ago
It will use `execvp` (which automatically reads the PATH variable, no shell required) if you use features that require it (like `before_exec` which runs a block of code between `fork` and `exec), but it generally prefers `posix_spawnp` (Which also uses PATH). The relevant code is here: https://github.com/rust-lang/rust/blob/7d3b9b1640611c52eb949dd60e8b9565997c6cea/src/libstd/sys/unix/process/process_unix.rs https://github.com/rust-lang/rust/blob/7d3b9b1640611c52eb949....
All of this is of course Unix specific, on Windows it uses `CreateProcess`.