I start gen_fsm:
start_link() -> gen_fsm:start_link({global, ?MODULE}, [], []).
How can i get it's PID?
Thank you.
If you check the documentation for gen_fsm:start_link/3 you'll see that it returns {ok, Pid}.
gen_fsm:start_link/3
{ok, Pid}
You can either get it as the result of gen_fsm:start_link/3 or since it is a registered process using whereis(nameofprocess).
If you check the documentation for
gen_fsm:start_link/3you'll see that it returns{ok, Pid}.