Description of POLLHUP in poll(2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'd like to propose adding the following to the current, somewhat terse, description of POLLHUP:

==

For stream sockets, this indicates that the peer closed its side of the connection. This does not necessarily imply that there's no more data to be read from the socket. POLLHUP may be set even if some unread data remains in the socket. Applications that need to process all data sent from their socket peer should use read(2) to check for unread data if POLLHUP is set.

==

That's something I didn't know -- I still learn something new every day -- When I get a POLLHUP I've assumed that it indicates an end-of-file condition, but that's not apparently the case, and having this documented would be helpful.

Attachment: pgpjmTtOPN8Vn.pgp
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux