Repository navigation
fix(libSceLibcInternal): fail posix_spawn with ENOENT when the program is not there - #6233
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows result for this PR, with Dusklight (PPSA99305, catalog 1.0.0). Setup: Windows 11, RTX 3070 (NVIDIA 610.60), MinGW build. This PR's head 3d42bdf merged onto
On the code-0 exit you saw once: the prelaunch menu at the pinned dusklight commit 34a144a49 has Select Disc Image, Settings, Mods and Quit. Quit's handler only sets AI-assisted: yes |
|
@DavidSamir thanks for the Windows run, and for tracing the code-0 exit to the menu's Quit. That explains my one odd run too. I added your result to the description. AI-assisted: yes (Claude Code) |
…m is not there Dusklight (PPSA99305) aborts on main as soon as its Select disc image item is chosen: SDL's file dialog probes "zenity --version" through posix_spawnp, and posix_spawnp throws "process creation not implemented". FreeBSD 11.4's posix_spawn returns the error of the child's exec, and an exec of a program that is in no directory of PATH (_PATH_DEFPATH when PATH is unset) fails with ENOENT. Both calls now return ENOENT without writing the process ID when the program is not in the guest file system, and keep throwing when it is. SDL then reports the file dialog as unsupported and the title stays on its menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3d42bdf to
a7c68a3
Compare
What
Dusklight (PPSA99305, catalog 1.0.0) aborts on
maind92a8da as soon as Select disc image is chosen on its first menu, with no disc image in its folder:With a temporary print in
posix_spawnp(not part of this PR), the title calls it twice with filezenity, argumentszenity --versionand three file actions. Its next log line names SDL's file dialog:File selection failed: File dialog driver unsupported (supported values for SDL_HINT_FILE_DIALOG_DRIVER are 'zenity' and 'portal'). The port's own patch says the console has no file dialog (dusklight.patch); it takes a disc image from its folder instead.FreeBSD 11.4's
posix_spawnreturns the error the child's exec leaves, and writes the process ID only when the exec succeeds (_posix_spawn_thr,do_posix_spawn).posix_spawnpsearchesPATH, or_PATH_DEFPATHwhen it is unset, and fails withENOENTwhen no directory holds the program (_execvpe,execvPe).Both calls now look for the program in the guest file system the same way. When it is not there they return
ENOENTwithout writing the process ID; when it is there they still throw, since no process is created. This is the same modelsystemalready uses (a sandbox without/bin/sh). The attributes and file actions are not applied, and whether the console lets the child be created at all is unverified;docs/dev/debt/libSceLibcInternal.mdrecords both.guest_posix_spawnnow spawns an existing and a missing program by path, through aPATHsearch (including an empty entry, which means the working directory) and withPATHunset.Tested
Ubuntu 24.04, GCC 13.3, Release, on
maind92a8da:guest_posix_spawnpasses 3/3. Withmain'sSpawn.cppand the new checks, it fails 3/3 withposix_spawn: process creation not implementedfor the missing program.guest_*tests pass or skip; the 5guest_video_out_*skips are their own no-display check.--to-inteland run with pad input from 8 s (RTX 4070 Ti, NVIDIA 595.99): onmainit aborts at 8–9 s in 3 of 3 runs, at the first Cross press. With this change, 6 of 7 runs reach the 30–45 s limit: the title logsFile selection failed, stays on its menu, and opens and moves through its Settings window (seen in screenshots). One run exited with code 0 at 11 s. Choosing the title's own Quit item gives the same exit; I did not capture which item that run chose.tools/check_conventions.py --base upstream/mainpasses, andtools/pr_overlap.py --branch fix/spawn-missing-programfinds no overlap.On Windows 11 (RTX 3070, NVIDIA 610.60, MinGW), @DavidSamir ran Dusklight with this PR merged onto
main4eb91ea.mainaborts at the first Cross withposix_spawnp: process creation not implemented. With this PR, a Cross-only run logsFile selection failed79 times and is still running at its 150 s limit, and a mixed button sequence exits with code 0 at 16 s after reaching the menu's Quit, whose handler only setsIsRunning = false(comment). That also accounts for my one code-0 run.Not checked on a console.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code