Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Authentication-Warning: ginger.cc.utexas.edu: grouse owned process doing -bs
Date: Fri, 17 Aug 2001 13:26:16 -0500 (CDT)
From: Michael Hoffman <hoffmanm@cshl.org>
To: Eric Yablonowitz <eyablon@askjeeves.co.uk>
cc: Cygwin <cygwin@cygwin.com>
Subject: RE: Cygwin Perl LWP timeout workaround 
In-Reply-To: <68417DD3E6D0D4119A16009027C40A8517ED41@AJUKMAIL>
Message-ID: <Pine.A41.4.21.0108171317360.48270-100000@ginger.cc.utexas.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Fri, 17 Aug 2001, Eric Yablonowitz wrote:

> Thanks for posting this workaround.  It has helped me immeasurably.
> The funny thing is that I experience a very similar timeout problem
> using Net::FTP as well as LWP.  Anyone know if these could be
> related?

As I've said before, this problem is very hard to diagnose because I
haven't found any way to reproduce it reliably. If anyone else has,
please let me know.

But here's what I've found:

IO::Socket::connect() makes IO non-blocking if there is a timeout
value given.

    $blocking = $sock->blocking(0) if $timeout;

Shouldn't a timeout value mean that IO should be blocking? Can someone
please answer this even if they don't have anything else to add?

If so, then this seems consistent with intermittent failures, i.e., if
non-blocking IO is used and the response doesn't come in RIGHT AWAY, a
timeout result is returned?

However, Solaris's IO::Socket::connect() seems to do the same thing
and I haven't heard of problems with it, although I haven't done
extensive usage to get this bug to arise.
--
Michael Hoffman <hoffmanm@cshl.org>
Cold Spring Harbor Laboratory




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

