pub unsafe extern "C" fn xila_process_wait(
process: *const Process,
child: *mut Child,
flags: u32,
status: *mut i32,
) -> StatusExpand description
Wait for a child to exit and collect its exit status, which reaps it: a later wait on
the same handle returns NoChild. Only the process that spawned the child may
wait. Inside a coroutine the call suspends until the child exits, so other tasks keep
running. With XILA_WAIT_NO_HANG, or outside a coroutine where nothing can suspend,
a running child returns WouldBlock. The status output is optional and written
only on success.
A child that exited and is not waited for keeps its status in its handle and holds no task. If its parent exits first, the root task adopts it.
ยงSafety
Process and child must be live and the status output, if any, aligned and writable.