Erlang: supervisor(3), adding a child process
问题 Where can I find example on how to add dynamic child processes to an existing supervisor ( simple_one_for_one restart strategy) ? 回答1: I did some research, and below is what I have. First, this is a sample callback module of a supervisor: -module(root_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). start_link() -> {ok, Pid} = supervisor:start_link({local, ?MODULE}, ?MODULE, []), {ok, Pid}. init(_Args) -> RestartStrategy = {simple_one_for_one, 10, 60}, ChildSpec =