delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=TZnpl92tE6NnnJPOAPdNXii4h2tCf3cJMOn2vLj+1h0BrUlQveEm7 | |
JixjyuYrYwaz4Y5THpOosLhxPTjoG2+ouJyjK9oLCUbEx4xvj4eaFGRxbnPfth1U | |
xTF+x671dVkvqpmN0h3kmsro4EbFww2qTQWQ1XjWhxZFqz8Z/S9F/c= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=kUYuPWc8cPbKZV+D3kkn86WzUPM=; b=RffhH4YZ5QTGrapo11S7tHLodpF4 | |
fXkfjscW8zyjJ96OxbwSFnjmRQ9BJZEKvPE+Ayxv1xeIGdnXoa1Ggatzm5qIv/c5 | |
0RVuD7+7m9JZCGRfNqbKcQSWdZrc5b78P6gnO3ZNY1Qx++kxbZ8BvoOwaJDDSYtF | |
8Wf+2mOqUCbwKXw= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Wed, 23 Apr 2014 17:38:30 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Dup'd sockets lose error information |
Message-ID: | <20140423153830.GN2339@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <20140423142541 DOT 156360 AT gmx DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <20140423142541.156360@gmx.com> |
User-Agent: | Mutt/1.5.21 (2010-09-15) |
--lYetfuAxy9ic4HK3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Apr 23 16:25, qq qq wrote: > The following code is a simplified app that was used to test-connect > to local ports 55000+ (none of which were actually listening) and > received false-positive "connected" results because Cygwin's dup() > for socket causes SO_ERROR to be lost. =C2=A0Since FD_SETSIZE is only 64 = on > Cygwin, the app uses dup()'s to lower the descriptors as it checks > them for completion. =C2=A0There is no such problem on Linux. > Also, strangely that Cygwin does not accept sin_addr as 0 to connect > locally (and either localhost or local host IP must be stuffed in > there, otherwise resulting in the "Cannot assign requested address" > error). This is Winsock at work. Cygwin doesn't check the AF_INET address when calling Winsock's connect, so Winsock's connect itself seems to have this issue. As for the SO_ERROR value, I have to check. Thanks for the testcase. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --lYetfuAxy9ic4HK3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTV952AAoJEPU2Bp2uRE+gLpIP/Rnu0b5Wqurr33KFhVt6Rqtk qSKA5IOU4CMxiaW6EISekQwh8fXAT85QVmuTmaWMt1zTIsvcyEOMNTdY1gnUF3lV hXBKugo5OsHSzKWaHH2wOwEj+wEYMCtkygMcVwsN9o4E6TxOEQmspFnYfqTwQCEg EKULpt8//ck96oBv3vxg3Ln81bUoVysigPaxAbRtvv0gGTtWl2w+FLaLcqA+yfrA AaVdYr9R9hmqNx3rWDybNpT7CEhaAw4FJ1NmfyY695jr9rDrM4W+h3Y8QS90cM8C FrUdztu4MaJLYZh6lELu/EcMzjj0PEP63uDJIwnGF3dmu9GH10QJ7v5PNj6+7Ohe qK5LcEvuKLG8ZYEgp4iueK5Q3o+87lDHum+KUDUyuF1SW8yU285R5Kp+139hQbGD zX7kMUsbXLdB4xPOGmDv9xIYxAMsQEf9m2WhDkMe+OQxgZrgMwmeVvt+ODAcGlTK nRoIsPs9qThY8I9wBODWDvzQAwCfELPUTf+BpZ+JIt36M5vr7v43+Co4BCzM9Me5 ycCPvWjEk8+TZQDNxhRpeiQ5w9PB9aMUR/dgRU0CHB6ehu2iyQJK2sYfvvxB9v4f yU/gWyp6J1BY+7scx1Rl6ydSJq/lgRuNwdnilBBH9tkZz7DzTvgCjUiQYzDdNnqZ Esnhbl6Bzx+V4LP51sFz =B2OW -----END PGP SIGNATURE----- --lYetfuAxy9ic4HK3--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |