Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Fri, 5 Jul 2002 14:48:28 +0200 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Re: Select with nonblocking connects Message-ID: <20020705144828.M21857@cygbert.vinschen.de> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i On Fri, Jul 05, 2002 at 11:27:22AM +0200, Thomas Pfaff wrote: > > There was a message in cygwin ml regarding nonblocking connects with > select. Will this be fixed to a unix compliant version or should i answer > him that he should use the exceptfds to get failed connects signaled ? We should try to create a Unix compliant behaviour but it doesn't hurt to tell him to use exceptfds until that's fixed. So, go ahead. Do you have an idea how to implement that? AFAICS, Linux also returns the fd in writefd if the connect hasn't been called yet and as long as no listen() has been called on the socket. So, probably we could add a flag `dont_use_in_select' to fhandler_socket. As long as it's 0, the SOCKET isn't used in a call to the Winsock select() but it's set in writefd automatically. The flag is set to 1 if a listen or a connect succeeds. After that, it's given to Winsock select() as usual. What do you think? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.