[erlang-questions] order of processes in supervisor
Wed Mar 21 13:19:32 CET 2012
On Wed, 21 Mar 2012 13:09:00 +0100
Ladislav Lenart <> wrote:
> Can you provide us with a stack trace of the crash? Chances
> are it is crashing for a different cause than you think.
Ehm - indeed it was... I changed the ordering and it crashed for
another reason, and it mislead me. Sorry about that, thanks for help.
> Ladislav Lenart
> On 21.3.2012 12:55, bartek wrote:
> > On Wed, 21 Mar 2012 12:32:51 +0100
> > bartek<> wrote:
> >> Hi
> >> Is there a way to configure supervisor so that it makes sure its
> >> child processes are started in due order - meaning child B starts
> >> only after A started successfully and completed its initialization?
> >> I have two processes of which one depends on the other, so I need
> >> to make sure that B is running only when A is running. I know can
> >> achieve it by monitoring, but I want them both supervised, and when
> >> they are being started by a supervisor B goes into a cyclic restart
> >> until A gets up, so this is not a clean solution. What is the right
> >> way to do it? Start B's supervisor from process A? Or use dynamic
> >> child creation somehow? But then a child process would have to get
> >> reference to its supervisor and call it after it is done - would it
> >> be kosher from OTP point of view?
> >> Thanks
> >> Bartek Górny
> > I read this one :) But the supervisor seems to trigger their startup
> > but not wait for it to complete. At least this is what I observed -
> > my child list is [A, B], and B in its init does "monitor(A)", and it
> > crashes.
> > B.
Do you know, where your towel is?
(re: Hitchhikers Guide to the Galaxy)
More information about the erlang-questions