I try to register group_leader() locally using
register( iogl, group_leader()).
but it returns with bad_arg error
** exception error: bad argument
in function register/2
called as register(iogl,<0.29.0>)
How can i give a local symbolic name to the group_leader() process?
I do able to register it as a global name using
global:register_name(iogl, group_leader()).
but its not what I need.
UPD: The real problem:
I create process on remote node (RN) using spawn from local node(LN), but i want that process to use group_leader of RN , not LN for io operations. Thank you.
The easiest way to do this is for the code you spawn on the remote node to do:
This will cause the remote code to use the remote IO group leader for output. You could also have the code you spawn remotely to set its group_leader to the pid of
user
shortly after it is spawned, it could then useio:format/2
normally and it will send its output to the correct place on the remote node.I guess the short answer is that the registered(symbolic) name for the standard group leader process on any node is
user
.