[erlang-questions] newbie question: multiple shells, same VM?

Miles Fidelman mfidelman@REDACTED
Thu Feb 2 11:13:52 CET 2012


Ngoc,

Exactly what I was looking for.  Thanks!  (And thanks for the amazingly 
quick reply at 5am in the morning, though it looks like it's a little 
later in the day for you :-)

Miles

Ngoc Dao wrote:
> 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:
> (mynode1@REDACTED)1>
>
> ngoc is my computer name.
>
> 2. In another console connect to that node:
> erl -sname mynode2 -setcookie mypassword -remsh mynode1@REDACTED
>
> 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.
>
> Ngoc
>
>
> On Thu, Feb 2, 2012 at 6:29 PM, Miles Fidelman
> <mfidelman@REDACTED>  wrote:
>> Hi,
>>
>> 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
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions


-- 
In theory, there is no difference between theory and practice.
In practice, there is.   .... Yogi Berra





More information about the erlang-questions mailing list