Attached you can find my small sample.  Please have a look and let me know what differs. <div>Just to add some confusion, my a_sup corresponds to your eapp_sup and my a_sup_2 corresponds to your a_sup.... ;)<div>/siri<br><br>
<div class="gmail_quote">2011/3/31 Wes James <span dir="ltr"><<a href="mailto:comptekki@gmail.com">comptekki@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Siri,<br>
<br>
The code is from last weeks training part of the Erlang Factory in San<br>
Francisco.  I don't know if Erlang Solutions would like me sending all<br>
the code to people or not.  I'd send it to you off-list if it was ok<br>
with them.<br>
<br>
Or maybe you could send me a sample of your code to compare with what I have.<br>
<br>
thx,<br>
<font color="#888888"><br>
-wes<br>
</font><div><div></div><div class="h5"><br>
On Thu, Mar 31, 2011 at 2:16 AM, Siri Hansen <<a href="mailto:erlangsiri@gmail.com">erlangsiri@gmail.com</a>> wrote:<br>
> Hi Wes,<br>
> It should be possible to do exactly what you want. I have tried to recreate<br>
> your problem, but I did not succeed. If you want to you may post the code<br>
> for the two supervisors and I will have a look at it to see what I'm doing<br>
> different.<br>
> Regards<br>
> /siri<br>
><br>
><br>
> 2011/3/30 Wes James <<a href="mailto:comptekki@gmail.com">comptekki@gmail.com</a>><br>
>><br>
>> when I start and app that works fine:<br>
>><br>
>> =PROGRESS REPORT==== 30-Mar-2011::11:28:05 ===<br>
>>          supervisor: {local,eapp_sup}<br>
>>             started: [{pid,<0.70.0>},<br>
>>                       {name,{a_sup,a1}},<br>
>>                       {mfargs,{a_sup,start_link,[a1]}},<br>
>>                       {restart_type,permanent},<br>
>>                       {shutdown,brutal_kill},<br>
>>                       {child_type,supervisor}]<br>
>><br>
>> In eapp_sup I have:<br>
>><br>
>> start_a(Module, Name) -><br>
>>        supervisor:start_child(?MODULE, child(Module, Name)).<br>
>><br>
>><br>
>> child(Module, Name) -><br>
>>  {{Module, Name}, {Module, start_link, [Name]}, permanent,<br>
>> brutal_kill, supervisor, [Name]}.<br>
>><br>
>><br>
>> from starting above it would seem that a_sup has the name a1, but if<br>
>> you run appmon it shows just as a_sup.<br>
>><br>
>> When I then run<br>
>><br>
>> eapp:start_a(a_sup,a2).  I would assume that a_sup could load as a<br>
>> second supervisor process with name a2, but this is what I get:<br>
>><br>
>> eapp_sup:start_a(a_sup,a2).<br>
>> {error,{already_started,<0.70.0>}}<br>
>><br>
>> I then create a_sup2  and eapp_sup:start_a(a_sup2, a1) and that loads<br>
>> fine, since the module "name" is not the same in the system as a_sup.<br>
>> But it seems like a name should be assigned to these to make them<br>
>> unique by name and be able to use the same supervisor code to<br>
>> supervise some more children.<br>
>><br>
>> Is that possible?<br>
>><br>
>> thx,<br>
>><br>
>> -wes<br>
>> _______________________________________________<br>
>> erlang-questions mailing list<br>
>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
>> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>