[erlang-questions] Erlang supervisor start_child

Alexander Kuleshov <>
Sun Jan 30 17:38:27 CET 2011


On Sun, Jan 30, 2011 at 4:37 PM, Alexey Romanov
<> wrote:
> [{_,_, Child, _}] = ...
>
> assumes that the right side only has one child.
>
>
> Yours, Alexey Romanov
>
>
>
> On Sun, Jan 30, 2011 at 7:30 PM, Alexander Kuleshov
> <> wrote:
>> On Sun, Jan 30, 2011 at 4:13 PM, Alexey Romanov
>> <> wrote:
>>> Yours, Alexey Romanov
>>>
>>>
>>>
>>> On Sun, Jan 30, 2011 at 7:05 PM, Alexander Kuleshov
>>> <> wrote:
>>>>>Since you can't have two processes with same registered name on a
>>>>>node, you need to provide different names (or no names at all).
>>>>
>>>> Hello,
>>>>
>>>> If i havent gen_fsm name, how can i gen_fsm:send_event to this gen_fsm?
>>>>
>>>
>>> By the pid (which you can get from supervisor:which_children).
>>>
>>
>> Thank you for reply.
>>
>> In popd_listener i try:
>>
>> pop_fsm_sup:start_child(Sock, [], []),
>> [{_,_, Child, _}] = supervisor:which_children(pop_fsm_sup),
>>
>> When i connect with first client it's ok, but when i try to connect
>> with second client i see error:
>>
>> Error in process <0.815.0> on node '' with exit value:
>> {{badmatch,[{undefined,<0.818.0>,worker,[popd_fsm]},{undefined,<0.819.0>,worker,[popd_fsm]}]},[{popd_listener,accept,1}]}
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:
>>
>>
>

Now all works.


More information about the erlang-questions mailing list