feat(libSceLibcInternal): implement posix_spawn actions #3651
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3651"
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 MarcZX10 on 2026-10-11T14:48:41Z.
What
Carries David's
posix_spawnimplementation from issue #3624, preserving his authorship. This PR covers process creation and spawn-configuration functions. The attribute and file-action calls follow FreeBSD 11.4: initialize/destroy the opaque objects, store attributes and ordered open/dup2/close actions, copyaddopenpaths, and returnEBADFfor negative descriptors.posix_spawnandposix_spawnpthrow because process creation is not implemented; callers do not receive a guessed process ID.Current title evidence
On
main88107b7de, Windows 11 catalog runs of both Dusklight (PPSA99305) and Wind Waker (PPSA99309) stop at unresolved import44hlATrd47U(posix_spawnattr_init). This addresses their first reported import stop; it does not claim either title reaches gameplay with process creation still unsupported.Tested
guest_posix_spawn_tests; CTest passed 1/1.42e5edadbhas not been built or tested locally. The Windows title reporter offered to rerun both titles on a rebased head; validation is pending.Checklist
main42e5edadb; no other open PR implements these functionsImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:49:04Z.
Progress report (
42e5eda→7bb59f7)📉 System libraries: 87.87% (-0.02%, +9 implemented, +2 declared functions)
✅ 9 implemented
posix_spawn_file_actions_addclose_nid_postfixposix_spawn_file_actions_adddup2_nid_postfixposix_spawn_file_actions_addopen_nid_postfixposix_spawn_file_actions_destroy_nid_postfixposix_spawn_file_actions_init_nid_postfixposix_spawnattr_destroy_nid_postfixposix_spawnattr_init_nid_postfixposix_spawnattr_setflags_nid_postfixposix_spawnattr_setsigdefault_nid_postfix🆕 2 declared as stubs
posix_spawn_nid_postfixposix_spawnp_nid_postfixImported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T15:19:42Z.
Independent pre-review on Linux (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.tools/check_conventions.py --base origin/mainpasses.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:58:32Z.
Closing: no title run reaches
posix_spawnor the attribute and file-action calls on main; the evidence is the import list, andposix_spawnitself still throws. Reopen with the title ID and the log line where a run stops at one of them.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T02:47:46Z.
Reopened: #3640 has a title stopping on it now (PPSA99305, #3624), and this is its next stop after that. The close was premature.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T08:23:49Z.
Conflicts with main in
docs/dev/TechnicalDebt.md, so the full build can't start; please rebase.Imported from boykopovar/AnyPS5. Originally posted by overlordxrz-source on 2026-10-12T11:22:15Z.
Run evidence for this one: on our Linux rig (lavapipe, main
b42ef24e), Dusklight (PPSA99305) stops on the unresolved import posix_spawnattr_init (44hlATrd47U):./app.elf: symbol lookup error: ./app.elf: undefined symbol: 44hlATrd47U
I can rerun it with this PR applied if that helps.
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-12T12:15:23Z.
A title whose first stop on
mainis this family: Dusklight (PPSA99305, v0.2.0, griches/PS5_Dusklight, GPL-3.0), which was added to the homebrew catalog this week. Onmain9fca13b5(Windows 11, catalog build witheboot.binandsce_module/libc.prxunwrapped) it fails to load with44hlATrd47Uisposix_spawnattr_init. It's the title's first stop, with no other PR needed before it, unlike XPSemu, which needs several merges before it gets here.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T07:06:30Z.
A second catalog title now stops on this family: Wind Waker (PPSA99309, catalog 1.0.1, GPL-3.0), new this week. On
main88107b7de, Windows 11, relinked with--windows --trap-sdk-syscall-stubs, it exits after 4 s withFAIL: unresolved ELF import 44hlATrd47U from libSceLibcInternal.prx(posix_spawnattr_init), the same first stop as Dusklight (PPSA99305). The PR conflicts withmainnow; once it's rebased I can run both titles with it on Windows.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:12:01Z.
Thanks for the additional title report. Wind Waker (PPSA99309) independently confirms the same posix_spawnattr_init load stop as Dusklight, and a Windows run of the PR would be useful. The PR currently conflicts with main, so please hold the comparison until there is a rebased head; I will post again when that is ready.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:41:12Z.
Rebased onto current
mainand preserved the currentlibSceLibcInternalCMake entries and debt documentation. The new debt entry records the updated evidence: both Dusklight (PPSA99305) and Wind Waker (PPSA99309) stop onmain88107b7deat unresolved import44hlATrd47U(posix_spawnattr_init). The previous Linux and Windows results predate this rebase; I have not rerun the current head locally.@LeandroLP23, you offered to rerun both titles once the PR was rebased. Could you check this exact head and report the first stop after it, if convenient?
posix_spawn/posix_spawnpstill throw, so this PR does not claim the titles reach gameplay.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:56:41Z.
The branch is now rebased onto current
main(42e5edadb), with David’s implementation commit preserved. The two reported catalog stops are still the stated basis; I have not rerun either title locally. @LeandroLP23, could you rerun Dusklight and Wind Waker on this exact head and report the next stop (or successful load), when convenient?posix_spawnandposix_spawnpremain explicitly unsupported, so the expected result may simply be a later stop.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T09:00:47Z.
Ran both titles on this exact head,
7bb59f73b, merged ontomain4bb2c7f39. The base needs #5014: on42e5edadbalone, no title loads on Windows, becauselibSceAgcDriver.prximportsLibcUnwind::CursorSlotsfromlibc.prx. Setup: Windows 11 (26300), WinLibs GCC 15.2.0, Release, relinked with--windows --trap-sdk-syscall-stubs.ctest -R posix_spawn: 3/3.posix_spawnattr_initand stops next atFAIL: unresolved ELF import cPGyc5FGjy0 from libSceLibcInternal.prx(atanhf), after 3 s.atanhf.main.So this PR moves both titles one import further. The next stop for both is
atanhf.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T14:09:11Z.
Dusklight (PPSA99305) reaches Menus on
mainnow that this PR and #5036 are merged: Windows 11 (26300), Radeon 860M, WinLibs GCC 15.2.0, Release,main6cd052848with no patches, catalog release relinked with--windows --trap-sdk-syscall-stubs, 60 s withAPS5_PAD_INPUT_FILEpulses from 30 s, frames dumped withAPS5_DUMP_FRAMES. It draws its title menu (Select disc image, Settings, Mods, Quit; "No disc image found."), and it responds to the controller: D-pad down moves the selection from Select disc image to Settings, then to Quit. No disc image was used.