<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 27, 2015 at 10:52 AM, Vimal Kumar <span dir="ltr"><<a href="mailto:vimal7370@gmail.com" target="_blank">vimal7370@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Going to add supervisors into this system and learn more about it.</blockquote></div><br>It doesn't happen in real systems, because the supervision trees are linked to the application controller, and not the shell. If you simply add a supervision tree, and link that tree to the shell, you are usually not free of the problem.</div><div class="gmail_extra"><br></div><div class="gmail_extra">When developing however, you can unlink the pid:</div><div class="gmail_extra"><br></div><div class="gmail_extra">{ok, P} = foo:start_link().</div><div class="gmail_extra">unlink(P).</div><div class="gmail_extra"><br></div><div class="gmail_extra">which will have P not die if the shell does.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The other resources to look out for are ETS tables, and port()'s, that is network sockets and files. If their controlling process, i.e. the shell, goes away, then that resource is cleaned/reaped/closed again.</div><div class="gmail_extra"><br clear="all"><div><br></div>-- <br><div class="gmail_signature">J.</div>
</div></div>