All of lore.kernel.org
 help / color / mirror / Atom feed
* Description of POLLHUP in poll(2)
@ 2010-07-25  1:12 Sam Varshavchik
       [not found] ` <cone.1280020358.708902.17185.500-lO+bjgoT4TKm14v+eVDVcBDJ/jce7dRH@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Varshavchik @ 2010-07-25  1:12 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

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 #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-02  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-25  1:12 Description of POLLHUP in poll(2) Sam Varshavchik
     [not found] ` <cone.1280020358.708902.17185.500-lO+bjgoT4TKm14v+eVDVcBDJ/jce7dRH@public.gmane.org>
2015-05-02  7:27   ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.