fix(runtime): fix typo in waidpid

Reviewed-by: ElKowar
This commit is contained in:
buffet 2022-10-24 19:45:25 +00:00
parent 4e1a835ddc
commit 6cd36a5ec5
2 changed files with 3 additions and 3 deletions

View file

@ -60,7 +60,7 @@ pub enum RuntimeError {
ForkFailed(#[source] Errno), ForkFailed(#[source] Errno),
#[error("waitpid error: {0}")] #[error("waitpid error: {0}")]
WaidPid(nix::Error), WaitPid(nix::Error),
#[error("I/O error: {0}")] #[error("I/O error: {0}")]
IOError(#[source] io::Error), IOError(#[source] io::Error),
@ -120,7 +120,7 @@ impl Shell {
None => OsString::new(), None => OsString::new(),
}; };
wait::waitpid(child, Some(WaitPidFlag::empty())).map_err(RuntimeError::WaidPid)?; wait::waitpid(child, Some(WaitPidFlag::empty())).map_err(RuntimeError::WaitPid)?;
Ok(bytes) Ok(bytes)
} }

View file

@ -225,7 +225,7 @@ fn wait_pgid(pgid: Pid) -> Result<Status, RuntimeError> {
Ok(_) => (), Ok(_) => (),
Err(err) => match err { Err(err) => match err {
Errno::ECHILD => break Ok(last_status), // no more children Errno::ECHILD => break Ok(last_status), // no more children
_ => break Err(RuntimeError::WaidPid(err)), _ => break Err(RuntimeError::WaitPid(err)),
}, },
} }
} }