feat(libkernel): implement wait through guest waitpid #3715
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3715"
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 Lorkydey on 2026-10-11T15:55:32Z.
What
Add the missing libkernel
wait(int*)export by forwarding to guestwaitpid(-1, status, 0). This matches the relationship between FreeBSD's wait and waitpid.AnyPS5 currently cannot create guest child processes, so its existing
waitpidreturns -1 with guest ECHILD (10).waitshares that behavior, leaves the output status untouched on failure, and accepts a null status pointer. It does not wait on host children or add process-creation support.PS5MC release 1.2, PPSA99420, imports
waitfromlibkernel.prx: symbol 444, NIDldVb3lc75PE. The import was inspected in the release executable; main has no provider for it. This is static import evidence, not a recorded title startup failure: PS5MC was not launched for this change.Tested
Windows, WinLibs MinGW-w64 GCC 15.2.0, Ninja, Release,
BUILD_TESTING=ON, based on maina11c8f7f70a0ed4e71504a89de69e8cdae687817.guest_waitpidwithwaitbehavior checks: return -1, replace an existing errno with ECHILD, preserve the supplied status, and accept a null status pointer.guest_waitpid,guest_execvp,guest_errors,guest_parent_process,guest_process_arguments,guest_credentials, andguest_system_command.guest_waitpidtakes 0.04 s.ldVb3lc75PEimport.tools/pr_overlap.py: no overlap. All-state searches for the export, NID, and wait-related PR titles found no existing implementation of this export.tools/progress.py: system libraries 2903/3383 (85.81%) -> 2904/3384 (85.82%).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T15:55:53Z.
Progress report (
a11c8f7→d71c51c)📈 System libraries: 85.82% (+0.01%, +1 implemented functions)
✅ 1 implemented
wait_nid_postfixImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T20:22:35Z.
I independently checked the
waitexport on Linux x86-64 with GCC 12.2.0, Release, andBUILD_TESTING=ON, based on currentmain(0a8b1d32). Theguest_waitpid_teststarget built, and CTestguest_waitpidpassed 1/1. This was a focused Linux check, not a full suite or title run.Imported from boykopovar/AnyPS5. Originally posted by Lorkydey on 2026-10-11T20:28:27Z.
@MarcZX100 hey thanks for testing this on Linux ! Really appreciate the check alongside my Windows tests :)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T21:07:38Z.
Independent Linux validation of the same
wait_nid_postfixforwarding change on currentupstream/main0a8b1d32(not a checkout of this PR head): GCC 12.2.0, Release,BUILD_TESTING=ON; builtguest_waitpid_testsand ranctest -R "^guest_waitpid$" --output-on-failure. Result: 1/1 passed. This confirms the focused behavior on current main; it does not validate this PR head’s older base or the Windows build.