From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31741 invoked by alias); 30 Jan 2018 09:05:00 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 31722 invoked by uid 89); 30 Jan 2018 09:05:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,CYGWIN_OWNER_BODY,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=H*RU:!192.168.1.100!, H*r:ip*192.168.1.100, Hx-spam-relays-external:!192.168.1.100!, H*u:6.1 X-HELO: m0.truegem.net Received: from m0.truegem.net (HELO m0.truegem.net) (69.55.228.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Jan 2018 09:04:57 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id w0U94tao053417 for ; Tue, 30 Jan 2018 01:04:55 -0800 (PST) (envelope-from mark@maxrnd.com) Received: from 76-217-5-154.lightspeed.irvnca.sbcglobal.net(76.217.5.154), claiming to be "[192.168.1.100]" via SMTP by m0.truegem.net, id smtpd8MGWnp; Tue Jan 30 01:04:47 2018 Subject: Re: RPC clnt_create() adress already in use To: cygwin@cygwin.com References: <59D90AF8D70E9740907BACDE2BCB520836DFC167@RESW102.resdom01.local> From: Mark Geisert Message-ID: <65e84fd3-291a-409c-668d-19c413d078aa@maxrnd.com> Date: Tue, 30 Jan 2018 09:05:00 -0000 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: <59D90AF8D70E9740907BACDE2BCB520836DFC167@RESW102.resdom01.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-01/txt/msg00287.txt.bz2 PAULUS, Raimund, TI-ABN wrote: > 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 Raimund, 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. ..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