server by supervisor in Erlang
In Erlang, I have a supervisor (my_sup) module to starts and monitor the gen_server process (my_gen). When the my_gen is modified, compiled and loaded, I need to restart the application.
Is there any better way to kill all the process (gen_server) by the supervisor (my_sup) and restart the process (gen_server) again?
To fix this is to stop the child and restart it.
Stop and reload the childs
restart_pool() ->
supervisor:terminate_child(?SEVER, ?WORKER),
supervisor:restart_child(?SERVER, ?WORKER).
链接地址: http://www.djcxy.com/p/6514.html
上一篇: 服务器异常退出:noproc
下一篇: 服务器由Erlang的主管完成