Switch almost all of Pal to Rusty error handling.

This commit is contained in:
4lDO2
2024-09-27 10:19:44 +02:00
parent 549bdc5c72
commit 313b32c815
20 changed files with 338 additions and 301 deletions
+1 -1
View File
@@ -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;
}