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:from:to:subject:date:message-id:content-type
	:content-transfer-encoding:mime-version; q=dns; s=default; b=rJM
	iF1soaVrGYRQEViwYj7mMdAWELf7M0JAv+jXYOpiwqDgja1FUoI52uSJXXq0JEX0
	JlBxNQzRlH7FsQeaBCEnDe5rAxhXD0oCAp981N5Fxl5kWE4qu5gb4/4albHAfX5Z
	86ISXKEpJomeHx6LmhHbI7iR6mtdBFZZnUEEmLf8=
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:from:to:subject:date:message-id:content-type
	:content-transfer-encoding:mime-version; s=default; bh=QAnEsCNHk
	f3tMNFQwgUCz5+boHQ=; b=drWBZmqVVG75Qy0ss8lBo2RnAYRRydq6LJT++cive
	pRcc6bxnFXJHS6E+xOeEaP0BApXHhMYh7WF//qd5GTZGYyQtV3ba0tQtZ4Gh7pTH
	arDVE1oD30QU/a2uTdvnPOU45mzUOUrt0D1k8JdAPBEnVA5mJsUbyDzyl/zSophU
	HQ=
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.6 required=5.0 tests=AWL,BAYES_50,CYGWIN_OWNER_BODY,GIT_PATCH_2,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=premium, Premium, Laptop, ursprngliche
X-HELO: mailrelay.dillinger.de
From: "PAULUS, Raimund, TI-ABN" <Raimund.Paulus@dillinger.biz>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: RPC clnt_create() adress already in use
Date: Tue, 30 Jan 2018 07:01:36 +0000
Message-ID: <59D90AF8D70E9740907BACDE2BCB520836DFC167@RESW102.resdom01.local>
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id w0U71vPK007933

Hi Mark,
as Corinna wrote in the thread " Cygwin socket option SO_REUSEADDR operates unlike Linux", the cause for the problem in libtirpc is Microsofts implementation of socket handling. If i implement a simple socket client, that is not so much of an issue, because I call the functions separately and can handle the error. Moreover in this case bind() is not necessary.
But in the case of libtirpc the implementation of clnttcp_create() determines the sequence of bind() and connect() for the local port and you cannot correct the error of bind() after the call of connect(). Therefore I think best is to set the port number to zero (port = 0) before the call to bind().

Raimund


-----Ursprüngliche Nachricht-----
Von: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] Im Auftrag von PAULUS, Raimund, TI-ABN
Gesendet: Dienstag, 9. Januar 2018 09:14
An: cygwin@cygwin.com
Betreff: WG: AW: RPC clnt_create() adress already in use

Hi Mark,

i have just tested it with the client-program from my email from December 29. The server-program is running on a linux-machine (SuSE Enterprise).
I compiled and linked the client.exe in Cygwin 1.5.18 on a PC with Windows XP SP3 and it works (loop 100 times). It was running in the bash-shell.
Thereafter I copied the client.exe to a Laptop with Windows 7 Home Premium. I started the program from the command prompt (cmd.exe) because rxvt doesn't work. 
The program works (loop 100 times).

Greetings

Raimund



-----Ursprüngliche Nachricht-----
Von: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] Im Auftrag von Mark Geisert
Gesendet: Dienstag, 9. Januar 2018 05:52
An: cygwin@cygwin.com
Betreff: Re: AW: RPC clnt_create() adress already in use

Hi Raimund,
I think I might have an idea where the root cause is.  But first I want to revisit your very first email on this subject, from last September 22.  You mentioned test results from various Cygwin versions vs various Windows versions.

Are you absolutely sure your test program ran correctly on Cygwin 1.5.18 on
*both* Windows XP and Windows 7?

The reason I ask is that Windows' handling of socket option SO_REUSEADDR has changed over time and Cygwin has had to make accommodations to keep up.  There might possibly be a need to revisit this within Cygwin.

I want to test a possible solution within the Cygwin DLL on my test machine but it has another two days to go on a factorization problem it's running (under Cygwin).  So I will respond again after I test.
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


--
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


--
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


