Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3E8272A7.50805@linuxforum.net> Date: Thu, 27 Mar 2003 11:40:23 +0800 From: David Huang User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: zh-cn, en-us, en, ja MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Failed non-blocking connect returns incorrect errno on AF_UNIX protocol References: <20030326124149 DOT 53b06bc5 DOT steven DOT obrien2 AT ntlworld DOT com> In-Reply-To: <20030326124149.53b06bc5.steven.obrien2@ntlworld.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Steven O'Brien wrote: > On Wed, Mar 26, 2003 at 08:48:33AM +0800, David Huang wrote: > >>Failed non-blocking connect returns incorrect errno on AF_UNIX >>protocol. > > > I think it is unlikely that the app really needs the connect() call to > be non-blocking (otherwise it would have to handle the in-progress Well, bingo, linc(cleanup.c) use code like this. > case). So a simple solution in most cases is to do the connect() first, > then the fcntl(fd, F_SETFL, O_NONBLOCK) so that data transfer is > non-blocking. Aha! Follow your hints, i modify the code, looks like linc-cleanup-sockets works a bit correct. And I remove fcntl(fd, F_SETFL, O_NONBLOCK) code, get the same result. But, what's the different between these? > > Regards, > Steven Thanks. > -- 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/