fix(libkernel): poll files, pipes and stdio descriptors #1832
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1832"
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 TideOPL on 2026-10-08T20:49:27Z.
What
pollthrew for every descriptor belowGuestSockets::FirstDescriptor, so a title that polls a file, a pipe or stdio (alone or next to its sockets) stopped there. That TechnicalDebt entry had no open PR (#1706 does the same forselect, Linux only).pollcall as the sockets, with the same flag mapping. Readiness,POLLHUPandPOLLNVALcome from the host.WSAPolltakes only sockets. A disk file (GetFileType=FILE_TYPE_DISK) or a directory descriptor is ready at once for the requestedPOLLIN,POLLOUTandPOLLRDNORM. That is FreeBSD's default vnode poll answer (vop_nopoll/vop_stdpoll:events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)). A descriptor with no CRT handle reportsPOLLNVAL, with the CRT invalid-parameter handler suppressed asNativeClosedoes. Pipes and consoles still throw.AddPollRequest.The TechnicalDebt entry is updated: Windows pipes and consoles still throw, and the vnode answer is not confirmed for the console's file systems.
Tested
guest_pollpasses. The new cases fail onmain(the export throws, exit 0xc0000409) and pass with the change.guest_pollpasses, including the pipe casescore/libs/tests/GuestPoll.cpp:POLLIN | POLLPRI | POLLOUT | POLLRDNORMnext to an idle listening socket, with an infinite timeout: returns 1 at once, the file reportsPOLLIN | POLLOUT | POLLRDNORMand the socket reports nothingclose:POLLNVALPOLLIN/POLLHUPafter the writer closescteston both: Windows 479/479 pass; Linux 485 pass, with 24 AGC subgroup/GPU tests skipped because WSL2 has no suitable Vulkan device.guest_udp,guest_tcpandguest_sce_net, which link the same file, pass on both.tools/check_conventions.py(with this description) andtools/check_test_registration.pypass.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)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:22:35Z.
Which title polls a file, pipe or stdio descriptor on main? With the ID and the log line where it stops this can go in; otherwise I'll close it until one does.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T10:26:20Z.
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)docs/dev/TechnicalDebt.mdL349core/libs/prx/libkernel/Socket/src/Udp.cppL15Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T13:48:53Z.
@TideOPL a title now stops here on
main(a11c8f7f): ProsperoTV (PPSA99003), right after its menu opens, polling the read end of apipe(descriptor 3) next to its sockets. Log line (in the title's owndownload0/profiles/10000000/logs/app.log):Details in #3584. If you reopen this with that evidence it should meet the intake rules; I won't open a copy.
Pull request closed