I have a Erlang application, with the supervisor starting a gen_server. The spawned gen_server has logic in its init/1 to hook a new process to the supervisor. When it do this operation with just,
supervisor:start_child(supervisor_name, Child_spec),
inside the init/1 the application hung up. But if I use,
rpc:cast(node(), supervisor, start_child, [supervisor_name, Child_spec]),
then the application run smoothly. Can any one give me some ideas to debug this situation or an insight is very much appreciated.