cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: 7.9.6 sparc-sun-solaris2.4 ftp timeout after connect?

From: Rich Gray <Rich.Gray_at_PlusTechnologies.com>
Date: Tue, 30 Apr 2002 09:14:47 -0400

> -----Original Message-----
> From: Daniel Stenberg [mailto:daniel_at_haxx.se]
> Sent: Tuesday, April 30, 2002 2:29 AM
> To: Rich Gray
> Cc: 'Bjorn Reese'; Curl Mailinglist
> Subject: RE: 7.9.6 sparc-sun-solaris2.4 ftp timeout after connect?
>
>
> On Mon, 29 Apr 2002, Rich Gray wrote:
>
> > > This seems to indicate that non-blocking sockets aren't possible
> > > on Solaris 2.4 (at least, it excludes all the alternatives that I
> > > am familiar with). However, before abandonning all hope we could
> > > try with fcntl(FNDELAY).
> >
> > No joy. :(
>
> Hm, we do in fact have a define for running without
> nonblocking sockets, try
> these lines in connect.c (efter the inclueds):
>
> #undef HAVE_O_NONBLOCK
> #undef HAVE_FIONBIO
> #define HAVE_DISABLED_NONBLOCKING
>
> This will however disable timeouts during connects...
>
> --
> Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
>

This worked. I wonder how much problem the lack of a timeout
on connect is? Doesn't the connect() call have its own inherent
timeout?

Some interesting issues here. How far does an application
go to be portable?? Our use of this old sparc system is
as a development platform. We have found that it is safer
to compile on old systems and trust that newer systems will
have good backward compatibility than to have new systems and
depend on older systems to have forward compatibility. Of
course, it keeps the cost of maintaining the porting farm
down too! (We have about a dozen Unix systems of various
flavor.)

I do think that we could get away with distributing 7.9.6 to
our customers, because they will be unlikely to be running
such an old creaky version of the Sun OS. I just talked
with one of our Unix support engineers and he says that
2.4 is way over the horizon and that 2.5.1 may soon be
getting a drop dead date. So, we may update our version
of the operating system to 2.5.1 or 2.6. There are also
some patches which we will apply today. There's some
hope:

In http://www.ibiblio.org/pub/sun-info/sun-patches/101945.readme
Patch-ID# 101945-63
Keywords: security y2000 libsocket automountd libc kadb ufs Neutron watchdog
ip
Synopsis: SunOS 5.4: Kernel update
Date: Jun/23/00

Solaris Release: 2.4
SunOS Release: 5.4
Unbundled Product:
Unbundled Release:
Xref: This patch available for x86 as patch 101946
Topic: SunOS 5.4: Kernel update
...
(from 101945-02)
...
1165687 reads on acceptor sockets not non-blocking under Solaris 2 when
listener is
1160112 socket library accidentally closes file descriptor on error
1120225 recv() returns EPIPE when called with MSG_PEEK
1152710 socket lib in 2.3/2.2 have problems with not clearing bad
connections and errno
1171478 socket recv() calls fail with EINVAL due to bad fix in 5.4

This is also an interesting ramification for autoconfigure
applications. If the goal is to compile a binary for distribution,
it should be tuned as minimally as possible to the compile platform
and perhaps make some runtime decisions instead compile time, based
on OS version (if that can be sensed reasonably...)

We'll see how the patches go.

Later,

Rich
Received on 2002-04-30