[erlang-questions] questions about supervisor behavior
Fernando Benavides
fernando.benavides@REDACTED
Mon Dec 27 16:55:28 CET 2010
I think your problem is that you're not linking the workers to the
supervisor. Remember the supervisor documentation:
> The start function must create and link to the child process, and
> should return {ok,Child} or {ok,Child,Info} where Child is the pid of
> the child process and Info an arbitrary term which is ignored by the
> supervisor.
You can try using gen_server:start_link/4 (i.e.
gen_server:start_link({local, Name}, ?MODULE, [], []).) instead of
gen_server:start/4
Hope this helps :)
On Mon, 2010-12-27 at 23:42 +0800, Seven Du wrote:
> Hi all,
>
> I have problems on get the supervisor working.
>
> I want to start a supvisor with 3 children, and then dynamically add
> children. Everything works fine except that when a child crashes, the
> supervisor doesn't know and then cannot restart automatically. What
> I'm doing wrong?
>
> Code in the following link.
>
> https://gist.github.com/756214
>
> Thanks.
> Seven.
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
More information about the erlang-questions
mailing list