posix_spawn() always returns its error rather than setting errno.

This commit is contained in:
Bryan Drewery
2018-02-28 22:16:35 -08:00
parent e6efd0d640
commit a9ea876960

View File

@@ -326,7 +326,7 @@ impl Command {
if ret == 0 {
Ok(Some(p))
} else {
Err(io::Error::last_os_error())
Err(io::Error::from_raw_os_error(ret))
}
}
}