[erlang-questions] Question about slave:start()

Vlad Dumitrescu vladdu55@REDACTED
Mon Mar 29 14:51:38 CEST 2010


On Mon, Mar 29, 2010 at 14:43, Ben Lackey <ben@REDACTED> wrote:
> 1> node().
> nonode@REDACTED
> 2>
>
> However, when I specify the node name master, erlang seems to pick up the
> name of the computer columbia as well.  Is this a bug or some sort of
> feature I don't understand?
>
> C:\Windows\system32>erl -sname master
> Eshell V5.7.5  (abort with ^G)
> (master@REDACTED)1> node().
> master@REDACTED

When starting with "erl" the distribution mechanism is not enabled and
the nonode@REDACTED name is just a placeholder. You can match against
that value to check if the current node is alive or not.

By specifying -sname or -name, you tell the runtime to enable
distribution and then it checks the computer name and a lot of other
related things.

See also http://erlang.org/doc/reference_manual/distributed.html for details.

regards,
Vlad


More information about the erlang-questions mailing list