I used to think calling gen_fsm:send_event( FsmRef , stop ) will unregister the global name associated with it.
But experiments suggest that is not the case.
global:unregister_name( FsmRef ) seems to FIX the issue.
Also some how using rpc call on different node to gen_fsm:start_link doesn’t give error that name is already registered. Strange!
Given that you know the name of the process (process is globally registered procName). You can make a rpc call to any of the authorized node in network.
string module = "global";
string func = "whereis_name";
Otp.Erlang.Object args = new Otp.Erlang.Object ;
args = new Otp.Erlang.Atom(procName);
setupMFA(module, func, args);
Otp.Erlang.Tuple reply = doRPC();