linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Varshavchik <mrsam-W1w4QoW4mIDgLSHwZvcCBg@public.gmane.org>
To: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Description of POLLHUP in poll(2)
Date: Sat, 24 Jul 2010 21:12:38 -0400	[thread overview]
Message-ID: <cone.1280020358.708902.17185.500@commodore.email-scan.com> (raw)

[-- 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 --]

             reply	other threads:[~2010-07-25  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-25  1:12 Sam Varshavchik [this message]
     [not found] ` <cone.1280020358.708902.17185.500-lO+bjgoT4TKm14v+eVDVcBDJ/jce7dRH@public.gmane.org>
2015-05-02  7:27   ` Description of POLLHUP in poll(2) Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cone.1280020358.708902.17185.500@commodore.email-scan.com \
    --to=mrsam-w1w4qow4midglshwzvccbg@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).