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
________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questio...@erlang.org
> Am I doing it wrong?
You don't link the worker process to the supervisor.
test:erl:
6 start_link() ->
7 gen_server:start(?MODULE, [], []).
Use gen_server:start_link() instead.
--
Tomasz Maciejewski
Thank you