[erlang-questions] simple_one_by_one trouble and rare start_link/2 gen_fsm

Angel J. Alvarez Miguel clist@REDACTED
Thu Jun 21 00:30:08 CEST 2012


Hi,

Please see example attached

While calling a simple_one_by_one supervisor to start a gen fsm I found it causes calling a start_link/2 function on the callback module of the gen_fsm. 

I was not able to locate this start_link/2 on the docs and i dont know how Args are suppoused to be joined (those from the childspec on the supervisor and those from the start_child call. 



Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

[QuickCheck] [PropEr] [Erl0MQ] 
Eshell V5.9.1  (abort with ^G)
1> test:main().
Starting simple_one_by_one group supervisor...
[GROUP SUP] Ready to manage MuC wuth opts: [{option1,40}]'s

Adding a child dynamically...

start_link called with 2 arguments: [{option1,40}] and [{dynamic_option,43}] this is not documented!!
init fsm with args: []
{ok,<0.34.0>}

Im alive!
Im alive!
Im alive!
Im alive!
Im alive!
Im alive!
FSM terminated (shutdown) after a few iterations on state idle...

2> 

am I wrong or this is not documented (R15B1)?

/Angel



-------------- next part --------------
A non-text attachment was scrubbed...
Name: group_supervisor.erl
Type: text/x-erlang
Size: 465 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120621/4292d9ba/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sim_group_fsm.erl
Type: text/x-erlang
Size: 2336 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120621/4292d9ba/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.erl
Type: text/x-erlang
Size: 375 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120621/4292d9ba/attachment-0002.bin>


More information about the erlang-questions mailing list