您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

13 行
294 B

  1. -module(foo_sup).
  2. -behavior(supervisor).
  3. -export([start_link/0,
  4. init/1]).
  5. start_link() ->
  6. supervisor:start_link({local, ?MODULE}, ?MODULE, []).
  7. init(_Args) ->
  8. FooChild = {foo,{foo, start_link, []}, permanent, 5000, worker, [foo]},
  9. {ok,{{one_for_all,1,1}, [FooChild]}}.