[erlang-questions] group leader blues

Joe Armstrong (TN/EAB) joe.armstrong@REDACTED
Mon Sep 4 16:41:12 CEST 2006


 I have two nodes foo and bar on the same host ws1234.

 From foo I want to output text in bar's shell.

 I tried this

        > P = rpc:call(foo@REDACTED, erlang, whereis, [user]).
        ..
      > io:format(P, "\nhello\n", []).

 Now if the shell in bar looked like this *before*  the above command
was executed:

    some text
    (bar@REDACTED)5> lists:rev
 
Then I expected that I should see this:
    
     some text
     hello
     (bar@REDACTED)5> lists:revs

But instead I see this:

     some text 
     (bar@REDACTED)5> lists:rev
     hello

Thus io:format does not work the same way that it does from a process
spawned locally in the shell running on node bar.

So when output from a remote node interrupts input in the local shell
the command line is not erased and rewritten correctly.

I tried various ways of getting hold of the group leader for shell on
the node bar, but non of these seem to work.

Does anybody know what's going on here?

/Joe






More information about the erlang-questions mailing list