(
pid: RawPid,
waitopts: WaitOptions,
)
| 374 | #[cfg(not(any(target_os = "espidf", target_os = "vita", target_os = "wasi")))] |
| 375 | #[inline] |
| 376 | pub(crate) fn _waitpid( |
| 377 | pid: RawPid, |
| 378 | waitopts: WaitOptions, |
| 379 | ) -> io::Result<Option<(Pid, WaitStatus)>> { |
| 380 | unsafe { |
| 381 | let mut status: c::c_int = 0; |
| 382 | let pid = ret_c_int(c::waitpid(pid as _, &mut status, waitopts.bits() as _))?; |
| 383 | Ok(Pid::from_raw(pid).map(|pid| (pid, WaitStatus::new(status as _)))) |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | #[cfg(not(any( |
| 388 | target_os = "cygwin", |