delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/07/05/14:30:17

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Fri, 5 Jul 2002 20:30:07 +0200
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: Select with nonblocking connects
Message-ID: <20020705203007.S21857@cygbert.vinschen.de>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <20020705144828 DOT M21857 AT cygbert DOT vinschen DOT de> <Pine DOT WNT DOT 4 DOT 44 DOT 0207051457380 DOT 256-100000 AT algeria DOT intern DOT net> <20020705155221 DOT P21857 AT cygbert DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20020705155221.P21857@cygbert.vinschen.de>
User-Agent: Mutt/1.3.22.1i

On Fri, Jul 05, 2002 at 03:52:21PM +0200, Corinna Vinschen wrote:
> On Fri, Jul 05, 2002 at 03:20:19PM +0200, Thomas Pfaff wrote:
> > 
> > I guess the easiest way is to add a flag in fhandler_socket that is set
> > when a connect is in progress. If it is set then add the sock handle to
> > exceptfds as well. After select returns check the exceptfds, if the socket
> > is signaled set it in writefds too. In UNIX you have to check the SO_ERROR
> > sockopt to know if the connect has succeded or failed, but winsock sets is as
> > well. Now clear the in_progress flag.
> > 
> > For listening sockets i see no difference.
> 
> Huh?  The problem is the same as long as neither connect() nor listen()
> have been called, nor a non-blocking connect() has succeeded.  In either
> case, the WinSock select() blocks if the SOCKET is given in write_fd,
> while the Linux select() returns with the fd set in write_fd.
> The difference is just the SO_ERROR value which is 0 as long as neither
> connect() nor listen() have been called, resp EINPROGRESS in case of a
> not finshed connect().
> 
> I'm not talking about a listening socket.  I'm talking about a socket in
> neither listening nor connected state.

I've checked in a patch.

Corinna

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019