This is the mail archive of the
mailing list for the Cygwin project.
Re: Failed non-blocking connect returns incorrect errno on AF_UNIXprotocol
- From: David Huang <hzhr at linuxforum dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 27 Mar 2003 11:40:23 +0800
- Subject: Re: Failed non-blocking connect returns incorrect errno on AF_UNIXprotocol
- References: <firstname.lastname@example.org>
Steven O'Brien wrote:
On Wed, Mar 26, 2003 at 08:48:33AM +0800, David Huang wrote:Well, bingo, linc(cleanup.c) use code like this.
Failed non-blocking connect returns incorrect errno on AF_UNIX
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
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
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?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html