[erlang-questions] prep_stop in an included application

Ulf Wiger ulf.wiger@REDACTED
Wed May 20 21:31:59 CEST 2009


This is true also for the start function and the
start phase callbacks.

It is your responsibility to take care of the included
applications.

In the AXD 301, we had a generic top-level application
callback that would look for environment variables
in the included applications - e.g. {'#prep_stop#', {M,F}}.

BR,
Ulf W

Alex Vazquez wrote:
> Hi list,
> 
> I would like to know if there is a way of forcing the execution of the 
> prep_stop() callback for an included application that is started by 
> adding its supervisor to the primary application supervisor.
> 
> The scenario i'm facing includes a primary application that launches 
> some included applications, with some of them launching another 
> applications too:
> 
> Prim
> IncA, IncB,
> IncA1, IncA2
> 
> Here, i need to manipulate the supervisor of the included application 
> (say, IncA) just before it stops, to allow deleting its own included 
> apps (say IncA1 and IncA2) before it terminates, doing it from inside 
> the included application and not from the primary one.
> 
> I'm experiencing that the prep_stop callback is only called for the 
> primary application and not for the included ones.
> 
> I now it can sound a bit akward. I can explain a bit further if needed.
> 
> Thanks in advance,
> 
> -- 
> Alejandro Vazquez Fente



-- 
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com



More information about the erlang-questions mailing list