All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk-manpages@gmx.net>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: linux-kernel@vger.kernel.org, michael.kerrisk@gmx.net
Subject: POLLRDHUP inconsistency between poll() and epoll
Date: Tue, 4 Apr 2006 03:49:54 +0200 (MEST)	[thread overview]
Message-ID: <20134.1144115394@www102.gmx.net> (raw)
In-Reply-To: Pine.LNX.4.64.0603261624110.15079@alien.or.mcafeemobile.com

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?

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/, 
read the HOWTOHELP file and grep the source 
files for 'FIXME'.

       reply	other threads:[~2006-04-04  1:49 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 [this message]
2006-04-04  2:14   ` POLLRDHUP inconsistency between poll() and epoll Davide Libenzi

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=20134.1144115394@www102.gmx.net \
    --to=mtk-manpages@gmx.net \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.kerrisk@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 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.