aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/supervisor.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-04-27 14:36:22 +0200
committerSiri Hansen <[email protected]>2011-06-17 15:44:05 +0200
commita8b656a0908d3af0d6776b662be5280867593be4 (patch)
tree816a3867d2a9f60f3361b63029dd95bd867bc4fe /lib/stdlib/src/supervisor.erl
parentaa5fb1df25e9f37f798a00ec6206838d73306968 (diff)
downloadotp-a8b656a0908d3af0d6776b662be5280867593be4.tar.gz
otp-a8b656a0908d3af0d6776b662be5280867593be4.tar.bz2
otp-a8b656a0908d3af0d6776b662be5280867593be4.zip
Handle exit reason {shutdown,Term} as shutdown for children of supervisor
In R13B proc_lib, gen_server and gen_fsm were all changed to handle exit reason {shutdown,Term} in the same way as exit reason 'shutdown', i.e. no crash reports are generated. This is an update of supervisor to do the same, i.e. handle these two exit reasons in the same way. This means that for children with restart type 'transient' there will be no attempt to restart the process if it terminates with reason {shutdown,Term}, and there will be no supervisor report.
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r--lib/stdlib/src/supervisor.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index e60706ed05..023183c5f0 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -661,6 +661,9 @@ do_restart(_, normal, Child, State) ->
do_restart(_, shutdown, Child, State) ->
NState = state_del_child(Child, State),
{ok, NState};
+do_restart(_, {shutdown, _Term}, Child, State) ->
+ NState = state_del_child(Child, State),
+ {ok, NState};
do_restart(transient, Reason, Child, State) ->
report_error(child_terminated, Reason, Child, State#state.name),
restart(Child, State);