aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-12-22 13:59:59 +0100
committerHans Bolinder <[email protected]>2011-12-22 13:59:59 +0100
commitf8afba0c65589a2215a9c01aa2b1302c96d056c5 (patch)
treeb6be2d4e0966f1fc7306478bc501dc7584390f4d /lib/stdlib/src
parent919565a8c1288cf56b0e421ca9fa4b53cac3910c (diff)
parentc2743754c9189e66a3a70248703118d8e61b7701 (diff)
downloadotp-f8afba0c65589a2215a9c01aa2b1302c96d056c5.tar.gz
otp-f8afba0c65589a2215a9c01aa2b1302c96d056c5.tar.bz2
otp-f8afba0c65589a2215a9c01aa2b1302c96d056c5.zip
Merge branch 'maint'
* maint: Check that sys.config and relup have valid content when added to tar Reject systools:make_script if kernel and stdlib are not permanent in .rel Don't save child spec for temporary child if child's start func returns ignore Generate links in C libraries correctly
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/supervisor.erl12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 42ea42f42e..ac5b078c29 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -270,6 +270,8 @@ start_children(Children, SupName) -> start_children(Children, [], SupName).
start_children([Child|Chs], NChildren, SupName) ->
case do_start_child(SupName, Child) of
+ {ok, undefined} when Child#child.restart_type =:= temporary ->
+ start_children(Chs, NChildren, SupName);
{ok, Pid} ->
start_children(Chs, [Child#child{pid = Pid}|NChildren], SupName);
{ok, Pid, _Extra} ->
@@ -325,6 +327,8 @@ handle_call({start_child, EArgs}, _From, State) when ?is_simple(State) ->
#child{mfargs = {M, F, A}} = Child,
Args = A ++ EArgs,
case do_start_child_i(M, F, Args) of
+ {ok, undefined} when Child#child.restart_type =:= temporary ->
+ {reply, {ok, undefined}, State};
{ok, Pid} ->
NState = save_dynamic_child(Child#child.restart_type, Pid, Args, State),
{reply, {ok, Pid}, NState};
@@ -611,12 +615,12 @@ handle_start_child(Child, State) ->
case get_child(Child#child.name, State) of
false ->
case do_start_child(State#state.name, Child) of
+ {ok, undefined} when Child#child.restart_type =:= temporary ->
+ {{ok, undefined}, State};
{ok, Pid} ->
- {{ok, Pid},
- save_child(Child#child{pid = Pid}, State)};
+ {{ok, Pid}, save_child(Child#child{pid = Pid}, State)};
{ok, Pid, Extra} ->
- {{ok, Pid, Extra},
- save_child(Child#child{pid = Pid}, State)};
+ {{ok, Pid, Extra}, save_child(Child#child{pid = Pid}, State)};
{error, What} ->
{{error, {What, Child}}, State}
end;