summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-04-12 09:20:31 +0100
committerMatthias Radestock <matthias@lshift.net>2010-04-12 09:20:31 +0100
commit20db4d3cec04b85629c12aed25daf1ef5efb9732 (patch)
tree4c8704519604214cd6bb66c8c559ce9457cc911f
parent5eaddfcf2278031cb69c773a64df41c3526d4f90 (diff)
downloadrabbitmq-server-20db4d3cec04b85629c12aed25daf1ef5efb9732.tar.gz
add rabbit_sup:start_child/3
This fleshes out the API. The change was cherry-picked from the bug21673 branch.
-rw-r--r--src/rabbit_sup.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_sup.erl b/src/rabbit_sup.erl
index 25715e6e..2c5e5112 100644
--- a/src/rabbit_sup.erl
+++ b/src/rabbit_sup.erl
@@ -33,7 +33,7 @@
-behaviour(supervisor).
--export([start_link/0, start_child/1, start_child/2,
+-export([start_link/0, start_child/1, start_child/2, start_child/3,
start_restartable_child/1, start_restartable_child/2]).
-export([init/1]).
@@ -49,8 +49,11 @@ start_child(Mod) ->
start_child(Mod, []).
start_child(Mod, Args) ->
+ start_child(Mod, Mod, Args).
+
+start_child(ChildId, Mod, Args) ->
{ok, _} = supervisor:start_child(?SERVER,
- {Mod, {Mod, start_link, Args},
+ {ChildId, {Mod, start_link, Args},
transient, ?MAX_WAIT, worker, [Mod]}),
ok.