<div dir="ltr">I'm afraid that did not work. I am passing an empty list, and if I execute [] ++ 1 in the shell I get 1.<br><br><div class="gmail_quote">On Wed, Aug 20, 2008 at 9:31 AM, Serge Aleynikov <span dir="ltr"><<a href="mailto:saleyn@gmail.com">saleyn@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Try starting it as:<br>
<br>
supervisor:start_child(erlfs_store_worker_sup, [{store_chunk, Chunk}])<br>
<br>
The simple_one_for_one strategy appends the arguments passed to supervisor:start_child/2 to the list of args specified in the supervisor's spec.<br>
<br>
Serge<br>
<br>
Matt Williamson wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hello,<br>
<br>
I am starting a gen_fsm with supervisor:start_child(erlfs_store_worker_sup,<br>
{store_chunk, Chunk}) but I get the following error:<br>
<br>
{error,<br>
{'EXIT',<br>
{badarg,<br>
[{erlang,<br>
apply,<br>
[erlfs_store_worker_fsm,<br>
start_link,<br>
{store_chunk,<br>
{chunk,<br>
{chunk_meta,<br>
{file_meta,<br>
"test123",<br>
"test.txt",<br>
0,<br>
"text/plain",<br>
{{0,1,1},{0,0,0}}},<br>
0,<br>
0,<br>
[]},<br>
<<"Hello world!">>}}]},<br>
{supervisor,do_start_child_i,3},<br>
{supervisor,handle_call,3},<br>
{gen_server,handle_msg,6},<br>
{proc_lib,init_p,5}]}}}<br>
<br>
I've been trying to figure it out for a while, but I am having a hard time.<br>
Here is the Child Spec in the supervisor (erlfs_store_worker_sup):<br>
<br>
init(Args) -><br>
WorkerSpec = {erlfs_store_worker_fsm, {erlfs_store_worker_fsm,<br>
start_link, []},<br>
temporary, 2000, worker, [erlfs_store_worker_fsm]},<br>
{ok,{{simple_one_for_one, 0, 1}, [WorkerSpec]}}.<br>
<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
<br>
</blockquote></div><br></div>