Skip to content

Commit a9ea876

Browse files
committed
posix_spawn() always returns its error rather than setting errno.
1 parent e6efd0d commit a9ea876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys/unix/process/process_unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ impl Command {
326326
if ret == 0 {
327327
Ok(Some(p))
328328
} else {
329-
Err(io::Error::last_os_error())
329+
Err(io::Error::from_raw_os_error(ret))
330330
}
331331
}
332332
}

0 commit comments

Comments
 (0)