SV: Killing Supervisor
Ulf Wiger (AL/EAB)
ulf.wiger@REDACTED
Fri Apr 28 14:57:44 CEST 2006
Samuel Rivas wrote:
>
> Ulf Wiger (AL/EAB) wrote:
> > Note also that the behaviours know which process is the parent, so
> > they are not so easily fooled. That's one reason why the first exit
> > might need to be exit(Top, kill) in some cases.
>
> Can they be fooled in any way? Parent pid is kept in
> gen_server main loop ... (Just curious)
Well, sure:
3> {dictionary, Dict} = process_info(whereis(sasl_sup), dictionary).
{dictionary,[{'$ancestors',[<0.30.0>]},
{'$initial_call',{gen,init_it,
[gen_server,
<0.30.0>,
<0.30.0>,
{local,sasl_sup},
supervisor,
{{local,sasl_sup},sasl,[]},
[]]}}]}
4> [[SaslParent|_]] = [A || {'$ancestors',A} <- Dict].
[[<0.30.0>]]
5> sasl_sup ! {'EXIT', SaslParent, shutdown}.
{'EXIT',<0.30.0>,shutdown}
6>
=INFO REPORT==== 28-Apr-2006::14:56:53 ===
application: sasl
exited: shutdown
type: permanent
{"Kernel pid
terminated",application_controller,"{application_terminated,sasl,shutdow
n}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller)
({application_terminated,sasl,shutdown})
/Ulf W
More information about the erlang-questions
mailing list