[erlang-questions] order of processes in supervisor

bartek bartek@REDACTED
Wed Mar 21 12:32:51 CET 2012


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

-- 
Jeśli boli cię gardło, ciesz się że nie jesteś żyrafą
(zauważone w aptece)



More information about the erlang-questions mailing list