enki / libev

Full-featured high-performance event loop loosely modelled after libevent
http://software.schmorp.de/pkg/libev
Other
1.64k stars 446 forks source link

/dev/null on FreeBSD: invalid fd #12

Open segoon opened 1 year ago

segoon commented 1 year ago

First, thanks for such a good library. I tried to run unit tests of userver (https://github.com/userver-framework/userver) on FreeBSD 13.1 and got an assert from libev: libev: kqueue found invalid fd. I think it is a problem of libev: 1) it is not EBADF, it is ENODEV (device doesn't support operation0, /dev/null doesn't support read/write I suppose. One should not assert on that. It looks odd to get "ok, you can read from fd" on Linux and assert on FreeBSD for /dev/null read polls. 1) the error message is cryptic, it is "operation not supported" and not "invalid fd".