[erlang-questions] newbie question: multiple shells, same VM?
Thu Feb 2 10:49:09 CET 2012
Yes this is possible.
Erlang is very famous for this feature.
1. In a console, start a node:
erl -sname mynode1 -setcookie mypassword
A prompt like this will appear:
ngoc is my computer name.
2. In another console connect to that node:
erl -sname mynode2 -setcookie mypassword -remsh
If you want to run the first node in background:
erl -sname mynode1 -setcookie mypassword -detached
Each node is like a virtual machine, virtual machine in the sense of
virtual OS in cloud computing.
On Thu, Feb 2, 2012 at 6:29 PM, Miles Fidelman
> Please pardon a perhaps silly newbie question.
> I'm just beginning to learn Erlang, and as I start playing with code that
> involves multiple concurrent processes, I find myself wanting to have
> multiple windows open, each running an Erlang shell, but all running on the
> same VM -- e.g., so I can interact with one process via one window and
> another process through a 2nd window, while those processes are both running
> in the same Erlang environment. (I.e., the same behavior one has with a
> regular Unix shell - open a new window, it's a new process, but it's running
> on a common underlying O/S instance).
> Which leads to the question: Is this possible, and if so, how?
> Thanks very much,
> Miles Fidelman
> In theory, there is no difference between theory and practice.
> In practice, there is. .... Yogi Berra
> erlang-questions mailing list
More information about the erlang-questions