Cygwin 1.3.3: Win2K: select() returning EBADF (causes thrashing in Boa)

Phil Dempster dempster@lsil.com
Fri Sep 21 00:55:00 GMT 2001


> The obvious question is why is boa sending a bad fd to select?

My apologies; I omitted to mention that the behaviour differs from the same
code compiled under Linux, where select() correctly blocks.

As far as I can determine, there is nothing wrong with the file descriptor.
Both block_read_fdset and block_write_fdset are zeroed at initialisation
(using the FD_ZERO macro).  The server's listening socket is set (using
FD_SET) in block_read_fdset.  select() does not block and returns
immediately with errno==EBADF.

> What thoughts were you expecting?  You obviously need to debug the code.

I was wondering if there any known issues with the Cygwin implementation of
select(), given that the underlying Microsoft Winsock  function does not map
entirely cleanly to the Berkley implementation.  Your response indicates
that there are no known issues ;-)

Cheers,
Phil.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list