-3

我启动 gen_fsm:

start_link() ->
     gen_fsm:start_link({global, ?MODULE}, [],
                   []).

我怎样才能得到它的PID?

谢谢你。

4

2 回答 2

5

如果您检查文档gen_fsm:start_link/3您会看到它返回{ok, Pid}.

于 2011-05-18T14:18:03.713 回答
1

You can either get it as the result of gen_fsm:start_link/3 or since it is a registered process using whereis(nameofprocess).

于 2011-05-18T18:36:04.217 回答