mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	michael.kerrisk@gmx.net
Subject: Re: POLLRDHUP inconsistency between poll() and epoll
Date: Mon, 3 Apr 2006 19:14:46 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604031911370.30048@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <20134.1144115394@www102.gmx.net>

On Tue, 4 Apr 2006, Michael Kerrisk wrote:

> Davide,
>
> While playing about with the new POLLRDHUP flag, I've noticed
> an inconsistency, which may or may not be intentional...
>
> When a POLLRDHUP condition occurs, epoll_wait() tells us about
> the condition, regardless of whether or not we specified
> (E)POLLRDHUPP in the 'events' flag given to epoll_ctl()
> EPOLL_CTL_ADD.  In this respect, POLLRDHUP is treated just like
> POLLHUP and POLLERR.  This seems perfectly reasonable.
>
> By contrast, poll() will only tell us that POLLRDHUP occurred
> if we specified POLLRDHUP in the file descriptor 'events' mask
> given to the poll() call.  In other words, poll() treats
> POLLRDHUP differently from POLLHUP and POLLERR.  This seems
> a little strange.
>
> Is this difference really intended?  If it is, what is the
> reason for the difference?

No. It is definitely better to keep behaviour consistent with poll/select. 
I'll submit a patch ASAP. Thank you spotting this out!



- Davide



      reply	other threads:[~2006-04-04  2:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0603261624110.15079@alien.or.mcafeemobile.com>
2006-04-04  1:49 ` Michael Kerrisk
2006-04-04  2:14   ` Davide Libenzi [this message]

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=Pine.LNX.4.64.0604031911370.30048@alien.or.mcafeemobile.com \
    --to=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.kerrisk@gmx.net \
    --cc=mtk-manpages@gmx.net \
    /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

all inboxes | Powered by JetHome®