This is the mail archive of the
mailing list for the Cygwin project.
Re: RPC clnt_create() adress already in use
- From: Mark Geisert <mark at maxrnd dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 30 Jan 2018 01:04:46 -0800
- Subject: Re: RPC clnt_create() adress already in use
- Authentication-results: sourceware.org; auth=none
- References: <59D90AF8D70E9740907BACDE2BCB520836DFC167@RESW102.resdom01.local>
PAULUS, Raimund, TI-ABN wrote:
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().
Von: firstname.lastname@example.org [mailto:email@example.com] Im Auftrag von PAULUS, Raimund, TI-ABN
Gesendet: Dienstag, 9. Januar 2018 09:14
Betreff: WG: AW: RPC clnt_create() adress already in use
Where, exactly, would you set the port number to zero? I can imagine how this
would solve the problem you're seeing but I'm concerned about other use cases.
It also seems a little odd to me we'd be making a Cygwin-specific patch rather
than "fixing" Cygwin itself so the patch would not be necessary. But I don't
feel strongly either way here. libtirpc already has Cygwin-specific patches.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple