From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19790 invoked by alias); 5 Jul 2013 12:42:18 -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 19759 invoked by uid 89); 5 Jul 2013 12:42:12 -0000 X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mk-filter-2-a-1.mail.tiscali.co.uk (HELO mk-filter-2-a-1.mail.uk.tiscali.com) (212.74.100.53) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 05 Jul 2013 12:41:58 +0000 X-Trace: 870012643/mk-filter-2.mail.uk.tiscali.com/B2C/$THROTTLED_DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/79.68.110.193/None/drstacey@tiscali.co.uk X-SBRS: None X-RemoteIP: 79.68.110.193 X-IP-MAIL-FROM: drstacey@tiscali.co.uk X-SMTP-AUTH: X-Originating-Country: GB/UNITED KINGDOM X-MUA: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYBAHb8yVFPRG7B/2dsb2JhbAANTYcIuT6CdoEcgxcBAQEEIxVAEQsYAgIFFgsCAgkDAgECATcBDRMIAQEXsCZzkSyBJoxtgTkWgjmBFAONTpADjkeBZwQF Received: from 79-68-110-193.dynamic.dsl.as9105.com (HELO [192.168.1.4]) ([79.68.110.193]) by smtp.tiscali.co.uk with ESMTP; 05 Jul 2013 13:41:47 +0100 Message-ID: <51D6BF0B.5030002@tiscali.co.uk> Date: Fri, 05 Jul 2013 12:42:00 -0000 From: David Stacey User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: recv() timeout problem References: <51D5C042.3070307@tiscali.co.uk> <20130705090044.GA4009@calimero.vinschen.de> In-Reply-To: <20130705090044.GA4009@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00115.txt.bz2 On 05/07/13 10:00, Corinna Vinschen wrote: > On Jul 4 19:34, David Stacey wrote: >> >Please find attached a short programme that demonstrates a problem >> >I'm having with recv() timeouts. Under Fedora 19 x64, the test >> >programme times out after three seconds (which is the desired >> >behaviour). However, when run from Cygwin, the call to recv() never >> >exits. >> > >> >I am using the latest snapshot (2013-07-03) in 32-bit Cygwin. OS is >> >Windows 7 Ultimate x64 SP1. >> > >> >Many thanks in advance for your help, > Unfortunately that won't work at the moment. > > The underlying implementation of recv is nonblocking. A blocking > Windows recv call is noninterruptible, unfortunately (at least up to > Windows 2003), so this was necessary to handle signals or > thread-cancellation. > > Due to its nonblocking nature under the hood, this doesn't support > SO_RCVTIMEO and SO_SNDTIMEO and, surprisingly, we never had a complaint > about that, despite its age. > > I can't promise a quick solution, but I put implementing handling of > SO_RCVTIMEO and SO_SNDTIMEO in recv/send on my TODO list. Of course, > patches are welcome, too. > > For the time being, I suggest to use select or poll with timeout > instead. Thank you for your e-mail, and for replying so quickly. Regarding the recv() timeouts: no problem, it's easy enough to work around. On your TODO list, file this one under things to do when you've finally got that cat. I think that's the last of my Poco problems out of the way. I'll give it a clean build and test, and send an ITP either this evening or tomorrow. Thanks once again for your help, Dave. -- 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