This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13660] poll wrong revents returned


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]