erlang resolver and resolv.conf

Alexey Shchepin alexey@REDACTED
Sat Feb 5 23:04:26 CET 2005


Hi!

>From lib/kernel/src/inet_config.erl:

do_load_resolv({unix,Type}, longnames) ->
    %% The Etc variable enables us to run tests with other 
    %% configuration files than the normal ones 
    Etc = case os:getenv("ERL_INET_ETC_DIR") of
	      false -> ?DEFAULT_ETC;
	      _EtcDir -> 
		  _EtcDir				 
	  end,
    load_resolv(filename:join(Etc,"resolv.conf"), resolv),
    ...

Other branches of this function doesn't have loading of /etc/resolv.conf.
I.e. resolv.conf is loaded on unixes only when erl is runned with -name option
(not the second argument to do_load_resolv), and with short name or without any
name reolv.conf is completely ignored.  Can someone describe reasons of such
behaviour?

Thanks!



More information about the erlang-questions mailing list