[erlang-questions] Supervision Tree

Lucky Khoza <>
Wed Nov 28 11:23:14 CET 2012


Hi Erlang Developers,

I'm actually trying to understand and compile the following module code,
and i don't understand why the init/1 function takes an argument which it
doesn't use at all, so when i try to compile the module it complains about
the argument _Args because it's unused.

May someone help me understand the use of this argument?

-module(ch_sup).
-behaviour(supervisor).

-export([start_link/0]).
-export([init/1]).

start_link() ->
    supervisor:start_link(ch_sup, []).

init(_Args) ->
    {ok, {{one_for_one, 1, 60},
          [{ch3, {ch3, start_link, []},
            permanent, brutal_kill, worker, [ch3]}]}}.


Thanks for a lot for your help, i really appreciate it.

Kindest Regards
Lucky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121128/e6ddbe10/attachment.html>


More information about the erlang-questions mailing list