aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/supervisor_1.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/test/supervisor_1.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/test/supervisor_1.erl')
-rw-r--r--lib/stdlib/test/supervisor_1.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stdlib/test/supervisor_1.erl b/lib/stdlib/test/supervisor_1.erl
index 3198be0fed..f819594c46 100644
--- a/lib/stdlib/test/supervisor_1.erl
+++ b/lib/stdlib/test/supervisor_1.erl
@@ -62,6 +62,12 @@ handle_info(die, State) ->
handle_info(stop, State) ->
{stop, normal, State};
+handle_info({'EXIT',_,shutdown}, State) ->
+ {stop, shutdown, State};
+
+handle_info({'EXIT',_,{shutdown,Term}}, State) ->
+ {stop, {shutdown,Term}, State};
+
handle_info({sleep, Time}, State) ->
io:format("FOO: ~p~n", [Time]),
timer:sleep(Time),