Files
Nim/lib/pure
bptato 29a7d60acb Fix ioselectors_kqueue raising wrong exceptions (#24079)
kqueue will remove pipes automatically if their read end is closed.
Unfortunately this means that trying to unregister it (which is
necessary to clean up resources & for consistency with other ioselectors
implementations) will set an ENOENT error, which currently raises an
exception.

(ETA: in other words, it is currently impossible to call unregister on a
pipe fd without potentially getting the selector into an invalid state
on platforms with kqueue.)

Avoid this issue by ignoring ENOENT errors returned from kqueue.

(Tested on FreeBSD. I added a test case to the tioselectors file; the
seemingly unrelated change is to fix a race condition that doesn't
appear on Linux, so that it would run my code too.)
2024-09-08 22:50:10 +02:00
..
2015-10-01 12:05:45 -07:00
2024-05-16 23:22:49 +02:00
2024-07-26 20:45:52 +02:00
2021-01-09 00:24:41 +01:00
2022-12-03 21:25:49 +08:00
2023-12-18 13:25:49 +08:00
2023-03-20 18:51:58 +01:00