Switch almost all of Pal to Rusty error handling.
This commit is contained in:
@@ -1320,7 +1320,7 @@ pub unsafe extern "C" fn system(command: *const c_char) -> c_int {
|
||||
unreachable!();
|
||||
} else if child_pid > 0 {
|
||||
let mut wstatus = 0;
|
||||
if Sys::waitpid(child_pid, &mut wstatus, 0) == !0 {
|
||||
if Sys::waitpid(child_pid, &mut wstatus, 0).or_minus_one_errno() == -1 {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user