X-Recipient: archive-cygwin@delorie.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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=hYBs4kemeTFneCmf
	Z1+Bx+Zx0BeEZ1laoKdaDy2y1ijsQcanhO1bYoEMSfRFqrN/ab3aYqi/jsSI7w+Q
	VGvQzL2itqsu+VgYwbmvpu5kIMrOMpjf/ATBCaRTetIlSOg7qnYvuDsAtdjDmtJc
	MmjYZzkMdFACrn9GepK3Z0qezIM=
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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=7O+fiTfNjHMOJDmvnk6yGP
	S/4CI=; b=nE+sF0InaSNHcXFGVvyoNI/J897Rit6lKHB5IOwOBLKo0mV7NoEQEM
	HQpqkSuSaEZ71XVk8yOH/03Uh/WzAnQybqL0EOY6Fgq/nXUslK+48quwOFBRf7L8
	6dhkBdbsxDo+KXETRijil+U+MGaFEDjhBMZsd65AQAzIx7oWy5vSc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*u:6.1, H*UA:6.1, day
X-HELO: m0.truegem.net
Subject: Re: RPC clnt_create() adress already in use
To: cygwin@cygwin.com
References: <59D90AF8D70E9740907BACDE2BCB520836E01220@RESW102.resdom01.local> <812cb3b6-9d28-971c-45eb-38421d817ca4@maxrnd.com> <20180131091053.GA4223@calimero.vinschen.de> <09e70acf-1b09-f1cc-1517-41b67b1836a9@maxrnd.com>
From: Mark Geisert <mark@maxrnd.com>
Message-ID: <0c44ae67-9021-c997-70d1-95115efcc9e8@maxrnd.com>
Date: Fri, 2 Feb 2018 00:11:01 -0800
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46
MIME-Version: 1.0
In-Reply-To: <09e70acf-1b09-f1cc-1517-41b67b1836a9@maxrnd.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Mark Geisert wrote:
> Corinna Vinschen wrote:
>> On Jan 31 00:15, Mark Geisert wrote:
>>> PAULUS, Raimund, TI-ABN wrote:
>>>> Hi Mark,
>>>>
>>>> in my email (https://sourceware.org/ml/cygwin/2017-12/msg00194.html) i
>>>> described 2 approaches. I prefer  nr 1.
>>>> Here the part of the source in bindresvport.c:
>>>> [...]
> [...]
>>
>> I'm a bit puzzled here in terms of using your own bindresvport.  Cygwin
>> implements bindresvport{_sa} for quite some time, 2006 or earlier.
>
> Yeesh; I did not know that.  Thanks for pointing that out. So that means there's
> another possible way to try solving the OP's issue: by using Cygwin's
> bindresvport* in place of the one supplied with libtirpc.
>
> If we see the OP's issue with Cygwin's bindresvport*, I think it makes more
> sense to patch libtirpc than to change Cygwin's bindresvport*.  The crux of OP's
> issue is that libtirpc's code expects to see EADDRINUSE errors from bind()
> whereas on Cygwin they aren't often seen until you connect().
>
> I'll look into using Cygwin's bindresvport() in the next day or two.

My testing shows that OP's original issue goes away when libtirpc is compiled to 
use Cygwin's bindresvport() directly rather than using its own version of that 
function.

Raimund, could you try this newest possible solution?  Before the first #include 
in bindresvport.c, add the line
     #ifndef __CYGWIN__
and at the end of the file, add the line
     #endif
Then rebuild your libtirpc and your test programs linking against it, then run 
your tests.  If this proves to solve your original problem then I'll submit a 
patch of libtirpc to the Cygwin package maintainer.

Thank you,

..mark


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

