<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Re: Killing Supervisor</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText74235 dir=ltr>
<DIV dir=ltr><FONT face="Courier New" color=#000000 size=2>Hi every
one.</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>The suggested answer is of course
perfectly correct. However</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>I believe that that is not exactly
what Surindar is looking</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>for.</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>He writes that he wants to
terminate the entire supervision</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>tree using this function. That
indicates to me that this is</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>about stopping a part of his
system, in an ordered way.</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>My suggestion is to think of the
supevisor as a child to</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>a higher layer supervisor. Hence
the higher layer supervisor</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>should be told, using the supevisor
API, to stop the child</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>which is the supervisor in
question.</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>If you simply do exit(Pid,kill) on
the supervisor, it will not</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>be given the chance of terminating
its children in an ordered</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>way.</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>Best Regards,</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>Lennart</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Courier New" color=#000000
size=2></FONT> </DIV></DIV>
<DIV id=idSignature32348 dir=ltr>
<DIV><FONT face="Courier New" color=#000000
size=2>-------------------------------------------------------------</FONT></DIV>
<DIV><FONT face="Courier New" color=#000000 size=2>Lennart
Ohman
phone : +46-8-587 623 27</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Sjöland & Thyselius Telecom
AB cellular: +46-70-552 6735</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Sehlstedtsgatan
6
fax : +46-8-667 8230</FONT></DIV>
<DIV><FONT face="Courier New" size=2>SE-115 28 STOCKHOLM,
SWEDEN email : <A
href="mailto:lennart.ohman@st.se">lennart.ohman@st.se</A></FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Från:</B> owner-erlang-questions@erlang.org genom
Serge Aleynikov<BR><B>Skickat:</B> on 2006-04-26 13:36<BR><B>Till:</B> Surindar
Sivanesan<BR><B>Kopia:</B> erlang-questions@erlang.org<BR><B>Ämne:</B> Re:
Killing Supervisor<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Sorry, I typed too fast. It should've been SupervisorName
instead:<BR><BR>exit(whereis(SupervisorName), kill).<BR><BR>Serge Aleynikov
wrote:<BR>> exit(whereis(SupervisorPid), kill).<BR>><BR>> Surindar
Sivanesan wrote:<BR>><BR>>> Dear all,<BR>>> I have a supervision
tree. We have built in functions to kill the<BR>>> child
process.<BR>>> I want to kill the supervisor thereby terminating the
whole<BR>>> supervision tree. Is there any way to do that.<BR>>>
Please do my favour<BR>>><BR>>> --<BR>>> with
regards,<BR>>>
S.Surindar<BR>><BR>><BR>><BR><BR></FONT></P></DIV>
</BODY>
</HTML>