This is the mail archive of the
mailing list for the Cygwin project.
Re: 1.3.22: bug in poll() - WinXP/all
- From: Dan Kegel <dkegel at ixiacom dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 06 Jun 2003 14:22:08 -0700
- Subject: Re: 1.3.22: bug in poll() - WinXP/all
On Apr 15, Corinna Vinschen <corinna-cygwin at cygwin dot com> wrote:
On Tue, Apr 15, 2003 at 04:59:53AM -0700, Chet wrote:
I recently starting moving a project over from Redhat 7.x to Cygwin and found a
slight problem using poll() and a set of descriptor structs with POLLIN,
POLLOUT, and POLLPRI set. Using this combination or any two of those flags can
causes poll() to return an incorrect number of structs containing returned
After looking through the source I noticed that poll() returns the value from
cygwin_select. This is incorrect as cygwin_select() returns the total number of
descriptors containing events for the send, recv, and except parts during the
Hmm, all these descriptors are getting a non-0 content in revents so
the number should be the same. Or do I miss something?
select's return value is subtly different from poll's. select
returns the number of events. poll returns the number of fd's with events.
If an fd has more than one event, select will return a higher number than poll.
This reminds me -- has anyone run the posix regression tests against Cygwin
lately? Maybe they'd catch stuff like this.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html