]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
input_stream: only rely on events for pipes+sockets
authorEric Wong <e@80x24.org>
Tue, 29 Apr 2025 17:16:47 +0000 (17:16 +0000)
committerEric Wong <e@80x24.org>
Thu, 1 May 2025 21:29:43 +0000 (21:29 +0000)
commit9291ff1669cc3de58def072840945c1128ec1b5e
tree375cfa161e7cd9c1253bd627909b53d0aa2afad2
parent94e89a7b4623c497e7b5d6386dac7d2c71e000df
input_stream: only rely on events for pipes+sockets

If using kevent(2) in the event loop, kevent actually accepts
EVFILT_READ for regular files instead of triggering EPERM
as epoll_ctl(2) does.  This kevent-specific behavior doesn't
work with our expected use with static files which don't see
modifications.

I noticed this on FreeBSD when trying to make lei use kevent
for everything instead of select(2) for sockets and
kevent for EVFILT_SIGNAL only.
lib/PublicInbox/InputStream.pm