Files
AnyPS5/docs/dev
HQasperandClaude Opus 5.5 8fd72f02c5 fix(libkernel): poll kqueues as kqueue_poll answers
A kqueue descriptor is ready for POLLIN and POLLRDNORM while one of its
events is triggered and for no other event, as FreeBSD's kqueue_poll
answers; poll threw for it on both hosts. A kqueue cannot be waited on,
so while one is polled poll checks it every millisecond and waits on the
other descriptors in slices of 1 ms. This is the loop Windows already
used for pipes, which Linux now shares.

A kqueue closed during the wait reports POLLNVAL, and one whose number
was reused is polled again with the rest of the timeout, as FreeBSD's
pollrescan looks the descriptor up again.

Depends on #7248.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 18:13:27 +00:00
..