diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-09 16:35:39 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-09 16:35:39 +0100 |
| commit | c013109ca808fad0b46d57f90ebf596603d466f8 (patch) | |
| tree | e3ddd3ca4065992598f2c19ab47121911428b9a0 /src | |
| parent | cbddaa7c55703346ccb49512c2d334dfb4838990 (diff) | |
| download | rabbitmq-server-git-c013109ca808fad0b46d57f90ebf596603d466f8.tar.gz | |
Reverting rabbit_sup to not use intrinsic
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_sup.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rabbit_sup.erl b/src/rabbit_sup.erl index bf29d5426e..97613d17a5 100644 --- a/src/rabbit_sup.erl +++ b/src/rabbit_sup.erl @@ -31,7 +31,7 @@ -module(rabbit_sup). --behaviour(supervisor2). +-behaviour(supervisor). -export([start_link/0, start_child/1, start_child/2, start_child/3, start_restartable_child/1, start_restartable_child/2, stop_child/1]). @@ -43,7 +43,7 @@ -define(SERVER, ?MODULE). start_link() -> - supervisor2:start_link({local, ?SERVER}, ?MODULE, []). + supervisor:start_link({local, ?SERVER}, ?MODULE, []). start_child(Mod) -> start_child(Mod, []). @@ -52,9 +52,9 @@ start_child(Mod, Args) -> start_child(Mod, Mod, Args). start_child(ChildId, Mod, Args) -> - {ok, _} = supervisor2:start_child(?SERVER, - {ChildId, {Mod, start_link, Args}, - intrinsic, ?MAX_WAIT, worker, [Mod]}), + {ok, _} = supervisor:start_child(?SERVER, + {ChildId, {Mod, start_link, Args}, + transient, ?MAX_WAIT, worker, [Mod]}), ok. start_restartable_child(Mod) -> @@ -62,16 +62,16 @@ start_restartable_child(Mod) -> start_restartable_child(Mod, Args) -> Name = list_to_atom(atom_to_list(Mod) ++ "_sup"), - {ok, _} = supervisor2:start_child( + {ok, _} = supervisor:start_child( ?SERVER, {Name, {rabbit_restartable_sup, start_link, [Name, {Mod, start_link, Args}]}, - intrinsic, infinity, supervisor, [rabbit_restartable_sup]}), + transient, infinity, supervisor, [rabbit_restartable_sup]}), ok. stop_child(ChildId) -> - case supervisor2:terminate_child(?SERVER, ChildId) of - ok -> supervisor2:delete_child(?SERVER, ChildId); + case supervisor:terminate_child(?SERVER, ChildId) of + ok -> supervisor:delete_child(?SERVER, ChildId); E -> E end. |
