SV: Killing Supervisor

Lennart Öhman <>
Wed Apr 26 13:48:44 CEST 2006


Hi every one.
 
The suggested answer is of course perfectly correct. However
I believe that that is not exactly what  Surindar is looking
for.
He writes that he wants to terminate the entire supervision
tree using this function. That indicates to me that this is
about stopping a part of his system, in an ordered way.
 
My suggestion is to think of the supevisor as a child to
a higher layer supervisor. Hence the higher layer supervisor
should be told, using the supevisor API, to stop the child
which is the supervisor in question.
 
If you simply do exit(Pid,kill) on the supervisor, it will not
be given the chance of terminating its children in an ordered
way.
 
Best Regards,
Lennart
 
 
-------------------------------------------------------------
Lennart Ohman                   phone   : +46-8-587 623 27
Sjöland & Thyselius Telecom AB  cellular: +46-70-552 6735
Sehlstedtsgatan 6               fax     : +46-8-667 8230
SE-115 28 STOCKHOLM, SWEDEN     email   : 

________________________________

Från:  genom Serge Aleynikov
Skickat: on 2006-04-26 13:36
Till: Surindar Sivanesan
Kopia: 
Ämne: Re: Killing Supervisor



Sorry, I typed too fast.  It should've been SupervisorName instead:

exit(whereis(SupervisorName), kill).

Serge Aleynikov wrote:
> exit(whereis(SupervisorPid), kill).
>
> Surindar Sivanesan wrote:
>
>> Dear all,
>> I have a supervision tree. We have built in functions to kill the
>> child process.
>> I want to kill the supervisor thereby terminating the whole
>> supervision tree. Is there any way to do that.
>> Please do my favour
>>
>> --
>> with regards,
>> S.Surindar
>
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060426/515cba21/attachment.html>


More information about the erlang-questions mailing list