novice question

Steve Elkins <>
Sat Sep 9 18:41:27 CEST 2000


Meant to cc the list.

-------- Original Message --------
Subject: Re: novice question
Date: Sat, 09 Sep 2000 12:06:55 -0400
From: Steve Elkins <>
To: Daniel Neri <>
References: <> <>

Daniel Neri wrote:

> Yes, I was just about to report this problem; inet:gethostbyname/1
> always fails with {error, nxdomain} if /etc/resolv.conf has no
> "lookup" option (instead of assuming some reasonable default lookup
> order).

inet_db seems to be the relevant table.  Without a lookup option,
res_lookup has an empty list next to it and the nxdomain error shows
up.

The result of 'lookup file bind' in resolv.conf:

()3> ets:tab2list(inet_db).
[...
 {res_domain,[]},
 {res_retry,3},
 {res_ns,[{{205,152,0,5},53}]},
 {res_lookup,[file,dns]},
 ...]

The result of not having a lookup option:

 {res_lookup,[]},

Regards,
Steve



More information about the erlang-questions mailing list