process: sys_wait4: return ECHILD with no children

If the calling process has no children and no pending exit events to
handle, return ECHILD instead of waiting forever.
This commit is contained in:
Matthew Leach
2026-01-11 22:20:45 +00:00
committed by Ashwin Naren
parent a003ab8f71
commit 64bc004cdb
3 changed files with 12 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ pub fn kern_err_to_syscall(err: KernelError) -> isize {
KernelError::NotSupported => ENOSYS,
KernelError::NoMemory => ENOMEM,
KernelError::TimedOut => ETIMEDOUT,
KernelError::NoChildProcess => ECHILD,
e => todo!("{e}"),
}
}