Files
AnyPS5/core/libs/prx/libkernel
JJenkxandClaude Opus 5.5 2159dd620b fix(libkernel): notice a socket closed during poll or select
Both waits held the guest sockets they polled and handed the host one
poll call for the whole wait. A guest close dropped only the table entry,
so the native socket stayed open and the wait ran to its timeout: poll
returned 0 instead of POLLNVAL, and select reported EBADF only after its
next 100 ms re-lookup, or not at all when the timeout was shorter.
FreeBSD 11.4 wakes such a waiter and reports the closed descriptor.

Waits that include sockets now poll the host in slices of at most 10 ms
and, before each slice, check that every descriptor still maps to the
socket it held. A closed one answers POLLNVAL from poll and EBADF from
select.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 16:22:14 -05:00
..
…