[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev z (was Re: Timeout parameter?)
From: |
Kari E. Hurtta |
Subject: |
Re: lynx-dev z (was Re: Timeout parameter?) |
Date: |
Wed, 23 Dec 1998 11:14:56 +0200 (EET) |
Bela Lubkin:
> Kari E. Hurtta wrote:
>
> > Bela Lubkin:
>
> (a long time ago)
>
> > > brian j. pardy wrote:
> > >
> > > > IIRC, gethost[by]name() (whichever lynx uses, no source in front of me)
> > > > blocks when looking up a hostname, making it impossible to interrupt it.
> > > > That's why forking it away allows an interrupt.
> > >
> > > gethostbyname() comes from the BIND resolver library [dunno about under
> > > Windows or VMS]. In older 4.8/4.9 versions of the library, there are
> > > timeout parameters which can be modified. Unfortunately, they're in an
> > > internal structure which isn't documented or intended to be exposed.
> > > (I'm talking about struct __res_state _res, fields "retrans" and
> > > "retry".) I don't know whether this situation has changed in the
> > > current BIND 8.x versions.
> >
> > yes. Sendmail uses lot of code like:
> >
> > #if NAMED_BIND
> > /* unless interactive, try twice, over a minute */
> > if (OpMode == MD_DAEMON || OpMode == MD_SMTP)
> > {
> > _res.retrans = 30;
> > _res.retry = 2;
> > }
> > #endif
> >
> > As far I know many have compiled sendmail with BIND 8.
>
> That's inconclusive (to me, not knowing the sendmail build environment):
> "NAMED_BIND" might be defined only for BIND 4.x, not 8.x.
NAMED_BIND is always defined as 1:
| NAMED_BIND If non-zero, include DNS (name daemon) support, including
| MX support. The specs say you must use this if you run
| SMTP. You don't have to be running a name server daemon
| on your machine to need this -- any use of the DNS resolver,
| including remote access to another machine, requires this
| option. Defined by default in conf.h. Define it to zero
| ONLY on machines that do not use DNS in any way.
I do not have used BIND 8, so I do not is there some tricks needed.
What sendmail does is:
#if NAMED_BIND
#include <resolv.h>
#endif
(And I can guess that this is not native interface of BIND 8.)
> > Lynx is of course availabe much more systems that BSD (or Open Source)
> > Sendmail :-)
>
> Right, and this is no longer relevant since Lynx is using fork() and
> select() to control the duration of DNS lookups. We could conceivably
> also, or alternatively, use BIND retrans/retry, but I don't see much
> point in it.
Yes. fork() + select() is perhaps available about same platforms than for which
there is Sendmail available :-) So there is no advantages.
/ Kari Hurtta