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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]