RPC clnt_create() adress already in use

PAULUS, Raimund, TI-ABN Raimund.Paulus@dillinger.biz
Tue Jan 30 07:01:00 GMT 2018


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



More information about the Cygwin mailing list