⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

sys_waitpid

Function sys_waitpid 

Source
pub fn sys_waitpid(
    pid: i64,
    options: WaitOptions,
) -> Result<(ProcessId, WaitStatus), KernelError>
Expand description

Wait for a child process to change state.

§Arguments

  • pid - Process to wait for:
    • pid > 0: Wait for the specific child with that PID.
    • pid == -1: Wait for any child process.
    • Other negative values are reserved (currently treated as any child).
  • options - WaitOptions controlling blocking and status filters.

§Returns

A tuple of (child_pid, status) on success.