[erlang-questions] Newbie question--workers starting supervisors

Adam Lindberg <>
Tue Apr 17 16:01:28 CEST 2007


If the gen_server is supervised, where's that supervisor? Shouldn't it
be in the application then?

The supervisors will be linked to the gen_server, but you'd have to
write any crash-handling etc yourself in the gen_server, e.g. act as a
supervisor. That's the only trouble I could think about right now. So
the question is, what code do you actually have in that gen_server and
why can't it be somewhere else?

Cheers!
Adam

On 4/17/07, Edmund Jorgensen <> wrote:
> Hello,
>
> I've googled for this but I can't find the answer.  In an OTP
> application, is it acceptable to have a non-supervisor process (say a
> gen_server) start one or more supervisors?  The diagrams in OTP
> principles never show such an arrangement, but they don't warn against
> it either.  The gen_server in question is itself a long lived and
> supervised process.  Will the supervisors be correctly linked to the
> gen_server that started them?  Or am I asking for problems doing it
> this way?
>
> Thanks,
>
> Edmund
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
--
Adam Lindberg
Software Developer

Erlang Training and Consulting Ltd
401 Fruit and Wool Exchange,
Brushfield Street, London,
E1 6EL, United Kingdom
Company Registration 3893360 VAT Number GB 752 1091 57
Tel +44 207 456 1020
Fax +44 870 1390 779
Mobile +44 7960 726 016
Email 



More information about the erlang-questions mailing list