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

Vance Shipley vances@REDACTED
Thu Jun 21 06:22:54 CEST 2012


On Thu, Jun 21, 2012 at 12:30:08AM +0200, Angel J. Alvarez Miguel wrote:
}  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. 

You are specifying that function to be called to start the worker yourself.
In your module group_supervisor.erl you provide a child_spec() in the return
value of init/1:

  {mucfsm, {sim_group_fsm, start_link, [Opts]}, transient, 60, worker, [sim_group]}


The form of which is:

   {Id, StartFunc, Restart, Shutdown, Type, Modules}

The second argument, StartFunc, has the form:

   {Module, Function, Arguments}

You provided:

	{sim_group_fsm, start_link, [Opts]}


-- 
	-Vance



More information about the erlang-questions mailing list