[erlang-questions] Managing children

Bob Cowdery bob@REDACTED
Sun Oct 16 21:54:04 CEST 2011


I have an OTP system with one supervisor that starts 7 processes. When
all processes are running I need to do some initialisation by sending
event messages from an ets database.

What would be the appropriate way to achieve this. I don't see anything
specifically in supervisor that helps.

1. I could make the last process to start make the call, but that's a fudge.
2. I could send a message from every process at the end of its init/1 to
a monitor process and get it to make the call when everything has
started, but that seems like duplicating supervisor function.
3. I could run a process inside my supervisor module to either do what
(2) does or maybe call count_children/1 until I see all processes active.

Is there some reason why supervisor does not have callbacks for managing


More information about the erlang-questions mailing list