Skip to content
Permalink
Browse files

Fix Redox Errors

  • Loading branch information...
mmstick committed Dec 27, 2017
1 parent c1c44ec commit e22a3954a1f52931d1491ca16131660865df67d2
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/lib/sys/redox.rs
@@ -31,7 +31,7 @@ pub(crate) fn is_root() -> bool { syscall::geteuid().map(|id| id == 0).unwrap_or

pub unsafe fn fork() -> io::Result<u32> { cvt(syscall::clone(0)).map(|pid| pid as u32) }

pub fn fork_exit(status: usize) -> ! { syscall::exit(status) }
pub fn fork_exit(status: i32) -> ! { exit(status) }

pub fn wait_for_child(pid: u32) -> io::Result<u8> {
let mut status;
@@ -41,8 +41,8 @@ pub fn wait_for_child(pid: u32) -> io::Result<u8> {
status = 0;
match unsafe { waitpid(pid as usize, &mut status, 0) } {
Err(error) if error.errno == ECHILD => break,
Err(error) => return Err(io::Error::from_raw_os_error(error.errono)),
=> ()
Err(error) => return Err(io::Error::from_raw_os_error(error.errno)),
_ => ()
}
}

0 comments on commit e22a395

Please sign in to comment.
You can’t perform that action at this time.