aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/supervisor.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2010-11-22 15:21:14 +0100
committerBjörn-Egil Dahlberg <[email protected]>2010-11-22 15:21:14 +0100
commit4673e53596e53b303e277e99f4cd4ca21193a6ef (patch)
treea5270efddc903523cd44a5701d434aa9e8f629be /lib/stdlib/src/supervisor.erl
parent8404e1da17e0dfb8d14a21171803f757fac79883 (diff)
downloadotp-4673e53596e53b303e277e99f4cd4ca21193a6ef.tar.gz
otp-4673e53596e53b303e277e99f4cd4ca21193a6ef.tar.bz2
otp-4673e53596e53b303e277e99f4cd4ca21193a6ef.zip
Remove superfluous supervisor error report
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r--lib/stdlib/src/supervisor.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 5bdd1a8672..7102fb9f6e 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -668,14 +668,15 @@ terminate_children([], _SupName, Res) ->
Res.
do_terminate(Child, SupName) when Child#child.pid =/= undefined ->
- case shutdown(Child#child.pid,
- Child#child.shutdown) of
- ok ->
- Child#child{pid = undefined};
- {error, OtherReason} ->
- report_error(shutdown_error, OtherReason, Child, SupName),
- Child#child{pid = undefined}
- end;
+ case shutdown(Child#child.pid, Child#child.shutdown) of
+ ok ->
+ ok;
+ {error, normal} when Child#child.restart_type =/= permanent ->
+ ok;
+ {error, OtherReason} ->
+ report_error(shutdown_error, OtherReason, Child, SupName)
+ end,
+ Child#child{pid = undefined};
do_terminate(Child, _SupName) ->
Child.