MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / _waitpid

Function _waitpid

src/backend/libc/process/syscalls.rs:376–385  ·  view source on GitHub ↗
(
    pid: RawPid,
    waitopts: WaitOptions,
)

Source from the content-addressed store, hash-verified

374#[cfg(not(any(target_os = "espidf", target_os = "vita", target_os = "wasi")))]
375#[inline]
376pub(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",

Callers 3

waitFunction · 0.70
waitpidFunction · 0.70
waitpgidFunction · 0.70

Calls 2

waitpidFunction · 0.70
ret_c_intFunction · 0.50

Tested by

no test coverage detected