<div dir="ltr">Hi Chris,<div><br></div><div>what does you childspec for my_sup (i.e. the childspec specified in my_supersup) look like - or really, is the Shutdown element set to brutal_kill? If supervisor:terminate_child/2 causes the processes to be killed, that is probably the case. The recommendation is that Shutdown is set to infinity if the child is a supervisor, which will give it unlimited time to gracefully shut down all it's children and then itself.</div><div><br></div><div>Regards</div><div>/siri</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-06 16:31 GMT+01:00 Chris Clark <span dir="ltr"><<a href="mailto:boozelclark@gmail.com" target="_blank">boozelclark@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Sean<div><br></div><div><span style="font-size:13px">supervisor:terminate_child/2 does work however it causes errors in my logs so i am looking for a way to gracefully terminate the children.</span><br></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Thanks</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 4:20 PM, Sean Cribbs <span dir="ltr"><<a href="mailto:sean@basho.com" target="_blank">sean@basho.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Did you try supervisor:terminate_child/2?</div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Mon, Jan 5, 2015 at 11:44 PM, Chris Clark <span dir="ltr"><<a href="mailto:boozelclark@gmail.com" target="_blank">boozelclark@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Antonio<div><br></div><div>Thanks for the assistance. From what I have read  a supervisor should stop if it is sent a shutdown signal using <span style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:inherit;color:rgb(0,0,0);font-size:14px;line-height:17.8048000335693px;background-color:rgb(238,238,238)">exit(Pid, shutdown).</span> but it will only accept that signal from its parent process in an OTP application. I tried creating a function in the parent supervisor(my_supersup) stop_child(Pid) that then sends the exit(pid, shutdown) signal and then call that from the shell but that doesn't seem to stop it either.</div><div><br></div><div>Thanks,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 30, 2014 at 11:47 PM, Antonio Dias <span dir="ltr"><<a href="mailto:antonio.r.dias@gmail.com" target="_blank">antonio.r.dias@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, i'm fairly new to Erlang also, but can't you send a 'stop' message and use that to stop the process?<div><br></div><div>ADias</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div><div><div>On Thu, Dec 11, 2014 at 10:40 AM, Chris Clark <span dir="ltr"><<a href="mailto:boozelclark@gmail.com" target="_blank">boozelclark@gmail.com</a>></span> wrote:<br></div></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div><div><div dir="ltr"><span style="font-size:13px">Hi</span><div style="font-size:13px"><br></div><div style="font-size:13px">I am fairly new to erlang and have a question regarding properly stopping a supervisor that resides directly under another supervisor.</div><div style="font-size:13px"><br></div><div style="font-size:13px">My application consist of a top level supervisor (my_supersup) which is a simple_one_for_one supervisor of other supervisors my_sup. Each my_sup supervises a gen_server, serv and another supervisor that is also a simple_one_for_one supervisor of some workers</div><div style="font-size:13px"><br></div><div style="font-size:13px">my_supersup </div><div style="font-size:13px">(simple_one_for_one, transient)</div><div style="font-size:13px">|</div><div style="font-size:13px">|_______ ...</div><div style="font-size:13px">|</div><div style="font-size:13px">my_sup (one_for_all, transient)</div><div style="font-size:13px">|________________</div><div style="font-size:13px">|                            |</div><div style="font-size:13px">|                           serv</div><div style="font-size:13px">worker_sup           </div><div style="font-size:13px">(simple_one_for_one, transient)<br></div><div style="font-size:13px">|___________ ...</div><div style="font-size:13px">|              |</div><div style="font-size:13px">w1          w2</div><div style="font-size:13px"><br></div><div style="font-size:13px">How do shutdown an instance of my_sup gracefully without killing it. At present I can do it with supervisor:terminate_child and supervisor:delete_child but I would like them to shutdown rather than be killed if possible?</div><div style="font-size:13px"><br></div><div style="font-size:13px">Thanks in advance.</div></div>
<br></div></div></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div>Sean Cribbs <<a href="mailto:sean@basho.com" target="_blank">sean@basho.com</a>><br>Sr. Software Engineer<br>Basho Technologies, Inc.<br><a href="http://basho.com/" target="_blank">http://basho.com/</a></div>
</font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>