Ulf,<br><br>Thank you for your help.  I found very useful your observation that <br><br>"When spawning, the group leader of the spawned process will be inherited from the parent. If you spawn a process on another node, it will still have the same group leader as the parent."<br>
<br>As a convenience during testing, I was letting the referee process spawn the player processes, and evreyone wound up having the same group leader.  It was a simple matter to start the player processes independently of the referee, and then have them register with the referee.  After that, console io went to the right place automatically. <br>
<br>regards,<br>David<br><br><div class="gmail_quote">On Fri, Oct 24, 2008 at 2:44 PM, Ulf Wiger (TN/EAB) <span dir="ltr"><<a href="mailto:ulf.wiger@ericsson.com">ulf.wiger@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
David Cabana skrev:<div class="Ih2E3d"><br>
><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The messages flow correctly, but all the terminal io happens in<br>
a single console, the one associated with the referee node.<br>
<br>
My question is how to get player output written to the console of the corresponding<br>
player node? <br>
</blockquote>
<br></div>
Use io:format(user, Fmt, Args)<br>
<br>
Alternatively, set the group leader of the process to some<br>
local process - e.g. the group leader of net_kernel<br>
(found by calling process_info(whereis(net_kernel),group_leader)).<br>
<br>
The group leader is the process that's handed all io messages.<br>
The rpc server deliberately sets the group leader of an rpc<br>
handler process to that of the caller on the originating node,<br>
since the remote node may not always have a tty to print to.<br>
When spawning, the group leader of the spawned process will<br>
be inherited from the parent. If you spawn a process on<br>
another node, it will still have the same group leader as<br>
the parent.<br>
<br>
The BIF group_leader(Pid,New_group_leader_pid) sets a new<br>
leader.<br>
<br>
BR,<br>
Ulf W<br>
</blockquote></div><br>