aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-08-30 10:42:08 +0200
committerHenrik Nord <[email protected]>2011-08-30 10:42:16 +0200
commit6f81b23c61610373f96681a4ca85ca9701873ec6 (patch)
tree27e3071e01ebdf56f2d55bd85f929c446990c139 /lib/stdlib/src
parent036f82b9d3e664ec326f1a303d4f990848d94b96 (diff)
parent4f9b938112a80f1c1e210b1a6af40a42f833cfa2 (diff)
downloadotp-6f81b23c61610373f96681a4ca85ca9701873ec6.tar.gz
otp-6f81b23c61610373f96681a4ca85ca9701873ec6.tar.bz2
otp-6f81b23c61610373f96681a4ca85ca9701873ec6.zip
Merge branch 'ft/fix_supervisor_temporary_restart' into dev
OTP-9502
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/supervisor.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index e60706ed05..dc31647eb5 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -735,6 +735,13 @@ restart(one_for_all, Child, State) ->
terminate_children(Children, SupName) ->
terminate_children(Children, SupName, []).
+%% Temporary children should not be restarted and thus should
+%% be skipped when building the list of terminated children, although
+%% we do want them to be shut down as many functions from this module
+%% use this function to just clear everything.
+terminate_children([Child = #child{restart_type=temporary} | Children], SupName, Res) ->
+ do_terminate(Child, SupName),
+ terminate_children(Children, SupName, Res);
terminate_children([Child | Children], SupName, Res) ->
NChild = do_terminate(Child, SupName),
terminate_children(Children, SupName, [NChild | Res]);