simple_one_for_one child not restarting

Jacob Vorreuter jacob.vorreuter@REDACTED
Thu Dec 23 01:08:05 CET 2010


I'm having a problem where a child of a simple_one_for_one supervisor exists unexpectedly and is not replaced/restarted.

In my test, I'm sending an exit signal to the child process, but supervisor:which_children still shows the process as being supervised.

1> test_sup:start_link().
{ok,<0.33.0>}
2> {ok, Pid} = test_sup:start_child().
{ok,<0.35.0>}
3> supervisor:which_children(test_sup).
[{undefined,<0.35.0>,worker,[test]}]
4> exit(Pid, die).
true
5> is_process_alive(Pid).
false
6> supervisor:which_children(test_sup).
[{undefined,<0.35.0>,worker,[test]}]
7> 'WTF?!?'.
'WTF?!?'.

test.erl https://gist.github.com/752329
test_sup.erl: https://gist.github.com/752330

Am I doing it wrong?

Thanks,

Jake


More information about the erlang-questions mailing list