feat(libc): implement getprogname #1869
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1869"
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 TheAggie on 2026-10-08T22:27:43Z.
What
getprognamewas not exported. ccleste (PPSA59322) and the BlackBearReloaded OpenGL homebrew apps (UI Lab PPSA99050, OpenGL Showcase PPSA99005, Puzzles PPSA99006) import it.It returns
"eboot.bin", the same name libkernel already exports as__progname, so the two agree.core/libs/prx/libSceLibcInternal/Export.cpp:getprogname.guest_thread_atexittest: it returns"eboot.bin".Tested
Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release.
mainwith this PR and four other small libc/libkernel PRs of mine merged together (atol, getprogname, dup2, ctime/rewind, pthread_set_name_np). It was run from the generatedCTestTestfile.cmakecommands because antivirus blocksctest.exeon this machine.tools/check_conventions.py --base origin/mainpasses on this branch alone.Not tested on Linux or macOS.
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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T22:29:21Z.
Progress report (
ce64d8e→104050b)➖ System libraries: 84.76% (+0.0%, +1 implemented functions)
✅ 1 implemented
getprogname_nid_postfixImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T22:30:07Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceLibcInternal/Export.cppL106core/libs/prx/libSceLibcInternal/Export.cppL106core/libs/tests/GuestThreadAtexit.cppL12, L58Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T02:46:38Z.
Review: COMMENTED
Verified on Linux — the differential holds, which is the half the "Tested" line could not cover.
cmake --build build --target guest_thread_atexit_tests --parallel 16→ clean; the binary runs and passes, exit 0.mainwith the new test kept → the target fails to link:So the test cannot even run without the export, and its behavioural assertions are what carry the rest.
Claim cross-check:
getprognamereturns"eboot.bin"(Export.cpp:108) and libkernel defines__progname_nid_postfix = "eboot.bin"(libkernel/System/src/Process.cpp:116), so the two do agree, as the body says.The titles are named (ccleste PPSA59322; UI Lab PPSA99050, OpenGL Showcase PPSA99005, Puzzles PPSA99006) — that is exactly the part reviewers ask for, and it is here.
Not verified: Windows (the author's platform), and behaviour beyond what this test asserts.
Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:30:17Z.
Closing: none of the titles that import
getprognamestops at it on main: ccleste stops atshm_open, PPSA99005 and PPSA99006 atmkstemp, PPSA99050 atsceVideoOutGetResolutionStatus. Reopen when it's a title's next stop on main, with the log line.Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T06:35:56Z.
@TheAggie
getprognameis now the next stop for three catalog titles onmain52ce9b8a(Linux, catalog builds withsce_module/libc.prxunwrapped as #2605 requires), each withapp.elf: symbol lookup error: app.elf: undefined symbol: 7Psx1DlAyE4:This head (
104050b4) merges cleanly onto52ce9b8aandguest_thread_atexitpasses 5/5 (--repeat until-fail:5). With it, PS5MC and Emby5 go on tosetcontext(2VRU7xiqLO8), and Yamagi gets past it and aborts later without a log line in my headless run.Pull request closed