Skip to content

Conversation

@notgull
Copy link
Member

@notgull notgull commented Dec 4, 2024

Closes #213

@notgull notgull requested a review from fogti December 8, 2024 16:31
@fogti
Copy link
Member

fogti commented Dec 8, 2024

Can you point to any documentation / man-page or mailing list post which proves this? I couldn't find anything indicating this association in kqueue(2) of FreeBSD 14.2. (It is of course still a good idea to be able to specify the flag, I just don't see why this is termed "interrupt"; on the other hand, relation to HUP is a bit stronger, because it gets emitted when the end of the stream is reached, e.g. because all writers of a FIFO or such closed)

@notgull
Copy link
Member Author

notgull commented Dec 13, 2024

I swear that I saw some code using it like this, but I can't seem to find it now. Standby.

@vkrivopalov
Copy link

From https://man.freebsd.org/cgi/man.cgi?kqueue(2):

If the read direction of the socket has shut-
down, then the filter also sets EV_EOF in
flags, and returns the socket error (if any) in
fflags. It is possible for EOF to be returned
(indicating the connection is gone) while there
is still data pending in the socket buffer.

Typically, EV_EOF indicates that a socket has been shut down by a peer. See its application in
https://eradman.com/posts/kqueue-tcp.html
https://nima101.github.io/kqueue_server

From what I can tell, it looks pretty similar to EPOLLHUP in that regard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Make it so Event::is_interrupt corresponds to EV_EOF on kqueue platforms

4 participants