feat(libkernel_sys): implement _wait4 #18659
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18659"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-11-12T00:15:53Z.
What
_wait4 threw NotImplemented. In FreeBSD 11.4 libc it is the wait4 system call under its underscore name (lib/libc/sys, __weak_reference(__sys_wait4, _wait4)), with the same prototype, so it now takes (pid, status, options, rusage) and forwards to libkernel_sys wait4, as _dup2 does for dup2.
Tested
Linux (WSL2, Ubuntu): full build and suite on
b135a386b0, 4947/4947 tests pass; check_conventions passes. guest_kernel_sys_wait gains a _wait4 case, unpatched and patched (by NID), that runs every wait4 check through _wait4: EINVAL and ECHILD across pids and option masks without touching status or rusage, null and bad pointers, WNOHANG on a running child, reaping a forked child with its exit status and rusage, and EFAULT for bad rusage and status pointers. Against the previous stub both _wait4 cases abort on the NotImplemented throw.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)