Page MenuHomeFreeBSD

kern: unix: raise POLLIN when the remote end has shutdown writes
ClosedPublic

Authored by kevans on Fri, May 30, 1:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 9, 12:45 PM
Unknown Object (File)
Mon, Jun 9, 10:05 AM
Unknown Object (File)
Sun, Jun 8, 10:12 AM
Unknown Object (File)
Fri, Jun 6, 5:19 AM
Unknown Object (File)
Fri, Jun 6, 12:30 AM
Unknown Object (File)
Thu, Jun 5, 3:32 PM
Unknown Object (File)
Thu, Jun 5, 10:04 AM
Unknown Object (File)
Tue, Jun 3, 9:41 PM
Subscribers

Details

Summary

Historically, select(2) and poll(2) will return POLLIN if the next
read(2) would return EOF to signal that the application should try.

Fix the new stream/seqpacket poll implementation to do the same to avoid
breaking applications that expect it, and select(2) which won't poll
for POLLRDHUP. select(2) arguably should poll for POLLRDHUP on the
read set as well, but poll(2) should also surface it with only
events=POLLIN.

Fixes: d15792780760e ("unix: new implementation of unix/stream [...]")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64540
Build 61424: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Fri, May 30, 2:42 AM
sys/kern/uipc_usrreq.c
1695

Looking at uipc_socket.c's sopoll_generic, I wonder if this should instead be this to be technically correct (not that I can find anything actually using POLLIGNEOF except for the implicit use in pipe stuff?)

sys/kern/uipc_usrreq.c
1695

Gleb tried to get rid of POLLINIGNEOF. The bit is with us forever due to ABI reqs.

So most likely you are right.