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.
Of course you can register it, the group_leader is a pid like any pid. There are two reasons that you get the error:
And I repeat @OJ's question of why you would want to give it a name.