mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-08 13:50:20 +00:00
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]>