<div dir="ltr">This report pertains to R12B-4.<br><br>If I call net_adm:world(), and a valid .erlang.hosts file exists in the current directory, and I did not start Erlang with a node name, it crashes with a case clause error.<br>
<br><span style="font-family: courier new,monospace;">$ erl</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Erlang (BEAM) emulator version 5.6.4 [source] [64-bit] [smp:4] [async-threads:0] [hipe] [kernel-poll:false]</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Eshell V5.6.4 (abort with ^G)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">1> net_adm:host_file().</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[ender]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">2> net_adm:world(). </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">** exception error: no case clause matching ignored</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> in function net_adm:longshort/1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> in call from net_adm:do_ping/3</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> in call from net_adm:collect_nodes/2</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> in call from net_adm:expand_hosts/2</span><br><br>The source of this is in net_adm:longshort/1, which follows:<br><br><span style="font-family: courier new,monospace;">longshort(Host) -></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> case net_kernel:longnames() of</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> false -></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> uptodot(Host);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> true -></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Host</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> end.</span><br style="font-family: courier new,monospace;">
<br>net_kernel:longnames() returns 'ignored' if net_kernel is not running:<br><br><span style="font-family: courier new,monospace;">%% If the net_kernel isn't running we ignore all requests to the </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">%% kernel, thus basically accepting them :-)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">request(Req) -></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> case whereis(net_kernel) of</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> P when is_pid(P) -></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> gen_server:call(net_kernel,Req,infinity);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> _ -> ignored</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> end.</span><br style="font-family: courier new,monospace;"><br>longshort/1 should throw a meaningful (and documented) exception, e.g.<br><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">longshort(Host) -></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
case net_kernel:longnames() of</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
false -></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
uptodot(Host);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
true -></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Host</span><br><span style="font-family: courier new,monospace;"> ignored -><br> throw({error, net_kernel_not_running})</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
end.</span><br style="font-family: courier new,monospace;">
<br>Regards,<br>Edwin Fine<br></div>