Repository navigation
feat(libkernel): implement getppid - #3352
Merged
Merged
Conversation
Collaborator
|
Checked build and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exports
getppid(e6ovBo9ZvJc) from libkernel. It reports the host parent process ID, the same waygetpidreports the host process ID:::getppid()on Linux, and on Windows theth32ParentProcessIDof this process's entry in a Toolhelp32 process snapshot. A parent ID of 0 (a host process started from outside its PID namespace) is passed through, an ID aboveINT_MAXthrows likegetpid, and a failed snapshot throws.XashPS5 (PPSA19111) stops at it on
main04ab4a8, now thatcreat(#3322) is in (catalog build,eboot.binandsce_module/libc.prxunwrapped as #2605 requires; tracked in #1578):app.elf: symbol lookup error: app.elf: undefined symbol: e6ovBo9ZvJcFAIL: unresolved ELF import e6ovBo9ZvJc (getppid) from libkernel.prxapp.elf: symbol lookup error: app.elf: undefined symbol: 04AjkP0jO9U(_umtx_op, feat(libkernel): implement _umtx_op wait and wake operations #1482)FAIL: unresolved ELF import 04AjkP0jO9U (_umtx_op) from libkernel.prxTested
Linux (Ubuntu 24.04, GCC 13) and Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release: the new
guest_parent_processpasses 5/5 (--repeat until-fail:5) on both, with no warnings inProcess.cpporGuestParentProcess.cpp. It checks that the result is positive, differs fromgetpid, and is the same on a second call; on Linux it must equal the hostgetppid(), and on WindowsOpenProcessmust find a process with that ID.check_conventions.pypasses.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)