From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17390 invoked by alias); 2 Feb 2018 08:11:15 -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 17379 invoked by uid 89); 2 Feb 2018 08:11:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*u:6.1, H*UA:6.1, day 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; Fri, 02 Feb 2018 08:11:11 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id w128B9d9074961 for ; Fri, 2 Feb 2018 00:11:09 -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 smtpdywSDB9; Fri Feb 2 00:11:01 2018 Subject: Re: RPC clnt_create() adress already in use To: cygwin@cygwin.com References: <59D90AF8D70E9740907BACDE2BCB520836E01220@RESW102.resdom01.local> <812cb3b6-9d28-971c-45eb-38421d817ca4@maxrnd.com> <20180131091053.GA4223@calimero.vinschen.de> <09e70acf-1b09-f1cc-1517-41b67b1836a9@maxrnd.com> From: Mark Geisert Message-ID: <0c44ae67-9021-c997-70d1-95115efcc9e8@maxrnd.com> Date: Fri, 02 Feb 2018 08:11: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: <09e70acf-1b09-f1cc-1517-41b67b1836a9@maxrnd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-02/txt/msg00009.txt.bz2 Mark Geisert wrote: > Corinna Vinschen wrote: >> On Jan 31 00:15, Mark Geisert wrote: >>> PAULUS, Raimund, TI-ABN wrote: >>>> Hi Mark, >>>> >>>> in my email (https://sourceware.org/ml/cygwin/2017-12/msg00194.html) i >>>> described 2 approaches. I prefer nr 1. >>>> Here the part of the source in bindresvport.c: >>>> [...] > [...] >> >> I'm a bit puzzled here in terms of using your own bindresvport. Cygwin >> implements bindresvport{_sa} for quite some time, 2006 or earlier. > > Yeesh; I did not know that. Thanks for pointing that out. So that means there's > another possible way to try solving the OP's issue: by using Cygwin's > bindresvport* in place of the one supplied with libtirpc. > > If we see the OP's issue with Cygwin's bindresvport*, I think it makes more > sense to patch libtirpc than to change Cygwin's bindresvport*. The crux of OP's > issue is that libtirpc's code expects to see EADDRINUSE errors from bind() > whereas on Cygwin they aren't often seen until you connect(). > > I'll look into using Cygwin's bindresvport() in the next day or two. My testing shows that OP's original issue goes away when libtirpc is compiled to use Cygwin's bindresvport() directly rather than using its own version of that function. Raimund, could you try this newest possible solution? Before the first #include in bindresvport.c, add the line #ifndef __CYGWIN__ and at the end of the file, add the line #endif Then rebuild your libtirpc and your test programs linking against it, then run your tests. If this proves to solve your original problem then I'll submit a patch of libtirpc to the Cygwin package maintainer. 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