On Mon, 2002-07-01 at 09:38, Mike Gerdts wrote: > But... that begs the question, why not just use gethostbyname()? This > way it will get resolved out of /etc/hosts, NIS, LDAP, DNS, etc., and > nscd will take care of it. nscd exists on Solaris, Linux, and should be > available anywhere else that glibc works.
Oh, yeah.. the problem was that DNS timeouts took too long. It looks as though this has already been addressed in /etc/resolv.conf: options Allows certain internal resolver variables to be modified. The syntax is options option ... where option is one of the following: [items removed] timeout:n sets the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server. Measured in sec onds, the default is RES_TIMEOUT (see <resolv.h> ). attempts:n sets the number of times the resolver will send a query to its name servers before giving up and return ing an error to the calling application. The default is RES_DFLRETRY (see <resolv.h> ). Mike