[erlang-questions] Erlang supervisor start_child

Alexey Romanov alexey.v.romanov@REDACTED
Sun Jan 30 17:37:09 CET 2011


[{_,_, Child, _}] = ...

assumes that the right side only has one child.


Yours, Alexey Romanov



On Sun, Jan 30, 2011 at 7:30 PM, Alexander Kuleshov
<kuleshovmail@REDACTED> wrote:
> On Sun, Jan 30, 2011 at 4:13 PM, Alexey Romanov
> <alexey.v.romanov@REDACTED> wrote:
>> Yours, Alexey Romanov
>>
>>
>>
>> On Sun, Jan 30, 2011 at 7:05 PM, Alexander Kuleshov
>> <kuleshovmail@REDACTED> 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 'emacs@REDACTED' 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:erlang-questions-unsubscribe@REDACTED
>
>


More information about the erlang-questions mailing list