This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13660] poll wrong revents returned
- From: "teodori.serge at hotmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 09 Feb 2012 00:18:34 +0000
- Subject: [Bug libc/13660] poll wrong revents returned
- Auto-submitted: auto-generated
- References: <bug-13660-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13660
--- Comment #3 from Teodori Serge <teodori.serge at hotmail dot com> 2012-02-09 00:18:34 UTC ---
Well right now I'm still polling the sockets but if a peer closes connection or
shuts it down, I get POLLIN (I don't think this is normal), so in this case I
will try a read call, which in fact returns -1 (ERRNO -> invalid file
descriptor). The only thing I don't understand why the POLLERR, POLLNVAL or
POLLHUP events, because they are never filled in revent. If peer uses
shutdown(fd, write), it should fill in POLLHUP, and if peer uses close(fd), it
should fill in POLLERR or POLLNVAL???
Anyway at which point in the kernel are thoses events set, because not only
poll() has this problems I tried select and epoll, to be sure...
Can anyone point me to the right direction, thx :)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.