[erlang-questions] stop supervisor when no children are running

Richard Andrews bbmaj7@REDACTED
Mon May 4 14:03:21 CEST 2009


> Hi, I'm using a supervisor to restart a gen_server if it crashes (using
> transient restart rule). I would like to have the supervisor stop if the
> the gen_server process is stopped normally. Even better would be if the
> erlang process could be terminated (init:stop or similar).
> 
> Is there a way to do this?

You could tell the supervisor's parent to stop it. Then let the gen_server worker get killed off as its supervisor shuts down.


      Enjoy a safer web experience. Upgrade to the new Internet Explorer 8 optimised for Yahoo!7. Get it now.



More information about the erlang-questions mailing list