public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
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:00 -0000	[thread overview]
Message-ID: <59D90AF8D70E9740907BACDE2BCB520836DFC167@RESW102.resdom01.local> (raw)

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

             reply	other threads:[~2018-01-30  7:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30  7:01 PAULUS, Raimund, TI-ABN [this message]
2018-01-30  9:05 ` Mark Geisert
  -- strict thread matches above, loose matches on Subject: below --
2018-03-08 11:44 PAULUS, Raimund, TI-ABN
2018-03-08 15:24 ` Corinna Vinschen
2018-03-08 23:00 ` Mark Geisert
2018-03-02 10:39 PAULUS, Raimund, TI-ABN
2018-02-27  9:54 PAULUS, Raimund, TI-ABN
2018-02-27 10:37 ` Corinna Vinschen
2018-02-28  6:00   ` Mark Geisert
2018-02-06 11:29 PAULUS, Raimund, TI-ABN
2018-02-06 14:20 ` Corinna Vinschen
2018-02-07  6:54   ` Mark Geisert
2018-02-05 14:58 PAULUS, Raimund, TI-ABN
2018-02-05  8:19 PAULUS, Raimund, TI-ABN
2018-02-05 10:29 ` Mark Geisert
2018-02-05 11:26   ` Corinna Vinschen
2018-02-05 13:34     ` Corinna Vinschen
2018-02-05 14:06       ` Corinna Vinschen
2018-02-05 20:15         ` Corinna Vinschen
2018-02-02 12:58 PAULUS, Raimund, TI-ABN
2018-01-30 10:07 PAULUS, Raimund, TI-ABN
2018-01-31  8:15 ` Mark Geisert
2018-01-31  9:11   ` Corinna Vinschen
2018-01-31  9:35     ` Mark Geisert
2018-02-02  8:11       ` Mark Geisert
2017-12-19 16:13 PAULUS, Raimund, TI-ABN
2017-12-28  0:03 ` Mark Geisert
2017-09-29  9:52 PAULUS, Raimund, TI-ABN
2017-09-29 17:36 ` Mark Geisert
2017-09-27 12:51 PAULUS, Raimund, TI-ABN
2017-09-25  6:44 PAULUS, Raimund, TI-ABN
2017-09-27  9:50 ` Mark Geisert
2017-09-22  7:22 PAULUS, Raimund, TI-ABN
2017-09-24  9:49 ` Mark Geisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59D90AF8D70E9740907BACDE2BCB520836DFC167@RESW102.resdom01.local \
    --to=raimund.paulus@dillinger.biz \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).