supervisor

Vladimir Sekissov svg@REDACTED
Wed Nov 27 11:22:35 CET 2002


Good day,

klacke> > But to get it all to shutdown, If I don't recall incorrectly,
klacke> > you must set the permanence of the *applications* to permanent
klacke> > too in order to make any EXIT-cause be considered illegal.
klacke> > I think they are transient by default.
klacke> 
klacke> 
klacke> But how do I do this one. 

application:start(MyApp, permanent).

Another way, I think, - add dummy child to your supervisor tree, which could
call

init:reboot()

on shutdown message, as could do `terminate' callback in 'gen_*':

terminate(shutdown, State) ->
  init:reboot();
terminate(Other, State) ->
  ok.

Child spec in supervisor mustn't be `brutal_kill' for this to work.

Best Regards,
Vladimir Sekissov

klacke> On Tue, Nov 26, 2002 at 11:52:00PM +0100, Lennart Öhman wrote:
klacke> > Don't be angry with the supervisor, he is your friend :-)
klacke> > 
klacke> > You like all supervisors to be one_for_all recovery set and have all your
klacke> > processes
klacke> > to be permanent (to make any termination considered illegal). And if you like
klacke> > it to stop at the first fault you need to set restart intensity to
klacke> > 0 restarts over any time.
klacke> 
klacke> This one I was able to figure out by myself.
klacke> 
klacke> > 
klacke> > But to get it all to shutdown, If I don't recall incorrectly,
klacke> > you must set the permanence of the *applications* to permanent
klacke> > too in order to make any EXIT-cause be considered illegal.
klacke> > I think they are transient by default.
klacke> 
klacke> 
klacke> But how do I do this one. 
klacke> 
klacke> 
klacke> /klacke
klacke> 
klacke> 
klacke> 
klacke> -- 
klacke> Claes Wikstrom                        -- Caps lock is nowhere and
klacke> Alteon WebSystems                     -- everything is under control          
klacke> http://www.bluetail.com/~klacke      
klacke> cellphone: +46 70 2097763



More information about the erlang-questions mailing list