AnyPS5/core/libs/prx/libSceLibcInternal
David 2fe382c658 feat(libSceLibcInternal): implement the posix_spawn attribute and file action calls
XPSemu (PPSA97358) imports eleven posix_spawn calls from
libSceLibcInternal.prx, one reference each, and no call site is known.
Predicted stop (import order, not measured), behind isnanf (idx 296):
`FAIL: unresolved ELF import 44hlATrd47U from libSceLibcInternal.prx`
(posix_spawnattr_init, idx 347), followed by p--TkNVsXjA, LG6O0oW9bQU,
Sj7y+JO5PcM, Ud8CbISKRGM, Hq9-2AMG+ks, IUfBO5UIZNc, Heh4KJwyoX8 (348-355),
UV4m0bznVtU, Ani6e+T-y6Q and 3Nr9caNHhyg (379-381).

The nine object calls follow FreeBSD release/11.4.0 (8c639945a445)
lib/libc/gen/posix_spawn.c: posix_spawnattr_init allocates a zeroed
attribute object (ENOMEM on failure), _destroy frees it, _setflags and
_setsigdefault store the value; posix_spawn_file_actions_init allocates an
empty list (-1 on failure, as in 11.4), _destroy frees it with its
entries, and _addopen (path copied), _adddup2 and _addclose append in
order after returning EBADF for a negative descriptor. Null or
uninitialized objects, which FreeBSD dereferences, throw.

posix_spawn and posix_spawnp throw "process creation not implemented",
as execvp does: FreeBSD validates no argument before rfork/vfork, and no
child process can be created here. TechnicalDebt records them.
guest_posix_spawn covers the attribute round trips, the recorded action
sequence, the EBADF cases and the throws. NIDs computed with
tools/nid_names.py and present in aerolib.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 07:56:19 +00:00
..
include feat(libSceLibcInternal): implement the posix_spawn attribute and file action calls 2026-10-13 07:56:19 +00:00
CMakeLists.txt feat(libSceLibcInternal): implement the posix_spawn attribute and file action calls 2026-10-13 07:56:19 +00:00
Directory.cpp feat(libSceLibcInternal): implement fdopendir 2026-10-12 16:23:42 -03:00
Export.cpp feat(libSceLibcInternal): implement fminf required for PPSA99902 startup 2026-10-12 23:27:13 +02:00
FileTime.cpp fix(libSceLibcInternal): preserve errno after successful utime 2026-10-10 14:42:35 -04:00
FilesystemStatistics.cpp feat(libc): implement guest fstatvfs volume statistics 2026-10-11 15:57:20 +02:00
Getopt.cpp feat(libSceLibcInternal): implement getopt and getopt_long 2026-10-12 18:46:43 +00:00
PathStatistics.cpp feat(libc): query filesystem statistics by guest path 2026-10-12 19:42:52 +02:00
Spawn.cpp feat(libSceLibcInternal): implement the posix_spawn attribute and file action calls 2026-10-13 07:56:19 +00:00
UserContext.cpp feat(libkernel): implement getcontext, setcontext and makecontext 2026-10-11 13:00:38 +03:00