fix(libkernel): answer select on the standard and random device descriptors #3476
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3476"
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 alfalfa-star on 2026-10-11T11:13:01Z.
Carried for @Silverash-i8, who is under the intake limit (#2811). Their three commits are unchanged, with their authorship, on
main99c1c263, fromSilverash-i8/AnyPS5-fork:fix/select-non-socket-descriptors.What
selecthands every descriptor to the libSceNet socket poller and aborts on any it doesn't know:Unreal Engine 4 titles poll descriptor 0 (stdin) with
selectfor console commands, so they stop there a few seconds in.Titles:
main. With these commits on currentmain0f863c102(no other changes), it gets past the stop, renders the Unreal Engine logo and the legal screen, and next stops at #2548.Fix
259b9ca6:/dev/randomand/dev/urandomdescriptors (File::IsRandomDevice) are always readable and writable, as FreeBSD reports a seeded random device. When one is ready, the socket part of the same call doesn't wait.a670e93a: a descriptorselectcan't poll still throws, and the message now names it (select on descriptor N (not a libSceNet socket), or(libSceNet is not loaded)).2ba139df: descriptor 0 is never readable and descriptors 1 and 2 are always writable, as for a console title with no input. Reads from descriptor 0 still go to the host stdin. A TechnicalDebt entry records both assumptions.Any other non-socket descriptor (a pipe, say) still goes to the poller and throws as before.
Tested
guest_sce_net, with new cases for the random-device and standard-descriptor answers, and the socket tests pass;windows_exceptions, fails the same way onmain(#3411);guest_sce_netaborts onmainwith the line above and passes with these commits;ctest825/825 (4 video-out flip tests skipped as usual);I reviewed the change: it is the same answer I had written independently for RIDE 4, plus the random-device case.
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)Closes #2811.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T11:13:23Z.
Progress report (
0f863c1→2ba139d)📈 System libraries: 85.77% (+0.03%, +1 implemented functions)
✅ 1 implemented
select_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:52:18Z.
Checked on Linux: PR merged onto current main builds,
guest_sce_netpasses and fails without the Socket.cpp change; the diff keeps unknown non-socket descriptors throwing and TechnicalDebt records the stdio/random-device assumptions. Consistent with the Windows (@Silverash-i8) and RIDE 4 runs in the description; merging once CI is green.