This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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]

Re: Select waits for NonBlocking fd


On Thu, Jul 04, 2002 at 07:59:16PM +1000, Anurag Sharma wrote:
> Hi All,
> 
> We have come across a peculiar problem while setting up sockets for
> connection.
> 
> 1) We make the socket non-blocking 
> 2) give it an invalid port to connect to on the localhost.
> 3) errno is correctly set to EINPROGRESS
> 4) Doing a select on the socket waits indefinetly!!
> 
> Attached is code that displays this  behaviour. This code works as
> expected on linux.
> 
> Also if we check for socket error using  getsockopt before we do a select,
> no error is returned. On linux it correctly returns 'Connection refused'.

Thanks for the report and especially thanks for the test application.
I've applied a patch to the Cygwin source.  You could try the next
Cygwin developers snapshot.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/


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