X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=jtJTfk2T52bllEmVq/q6rk4/3ZRjGryJotXbvBvhgtW
	r+hHipDsf8ltWiv4DznntIkSF00d1jQ+HsLvys2Zr+fNpZiMD3d7mA3401GwDJhR
	3cpqxmJirk05FfcurLiRxgLvAbgeSdAsXqg47ttXqYNL014AfGbmImiFx0Vtlz6U
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=/6ipz61M3bkHYAovxZzlb6K1Yic=; b=aQ0ubL8tvB0lnUjnj
	tcB1+xAwFpQ/55zv2qKigPGeMUJ52pVR3YqR6F/x8oilG7PDpMLIM33HX4VEOk/Y
	nT5ZFGk5goRLJebW8gxao7TRLjABwkCHR4axrnfIxbe669SR7jqCNj57GpLv3PC7
	QSoomCtCaswZv+LzoGRJ/bhLBY=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
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
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
Message-ID: <51D6BF0B.5030002@tiscali.co.uk>
Date: Fri, 05 Jul 2013 13:41:47 +0100
From: David Stacey <drstacey@tiscali.co.uk>
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

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

