Open
Description
Relevant compiler test: https://github.com/rust-lang/rust/blob/master/src/test/ui/process/process-spawn-nonexistent.rs#L14
use std::io::ErrorKind;
use std::process::Command;
fn main() {
let result = Command::new("nonexistent").spawn().unwrap_err().kind();
assert!(matches!(
result,
ErrorKind::NotFound | ErrorKind::PermissionDenied
));
}
The resulting value for result
is -25
, which aligns with the Zircon error ZX_ERR_NOT_FOUND = -25
. This does not align with expected Rust-friendly return value.
Relevant code section is at
cc. @tmandry