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
+2 -1
View File
@@ -1,6 +1,7 @@
//! sys/wait.h implementation for Redox, following
//! http://pubs.opengroup.org/onlinepubs/7908799/xsh/syswait.h.html
use crate::error::ResultExt;
//use header::sys_resource::rusage;
use crate::platform::{types::*, Pal, Sys};
@@ -47,5 +48,5 @@ pub unsafe extern "C" fn wait(stat_loc: *mut c_int) -> pid_t {
#[no_mangle]
pub unsafe extern "C" fn waitpid(pid: pid_t, stat_loc: *mut c_int, options: c_int) -> pid_t {
Sys::waitpid(pid, stat_loc, options)
Sys::waitpid(pid, stat_loc, options).or_minus_one_errno()
}