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: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 09 Feb 2012 00:41:38 +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 #4 from Rich Felker <bugdal at aerifal dot cx> 2012-02-09 00:41:38 UTC ---
If you're getting "invalid file descriptor", that is a bug elsewhere in your
code. It indicates not that the peer has closed the socket, but that YOUR
PROGRAM has closed its end of the socket and it calling read on the file
descriptor after closing it. That has nothing to do with poll or glibc.
When the peer has closed the socket and your end is still open, poll should
return POLLIN|POLLHUP for the fd. This is correct because a call to read will
not block; it will return a zero-length read which means EOF.
--
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.