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).
4> [[SaslParent|_]] = [A || {'$ancestors',A} <- Dict].
5> sasl_sup ! {'EXIT', SaslParent, shutdown}.
=INFO REPORT==== 28-Apr-2006::14:56:53 ===
    application: sasl
    exited: shutdown
    type: permanent
{"Kernel pid

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller)

/Ulf W

More information about the erlang-questions mailing list