diff options
author | Björn-Egil Dahlberg <[email protected]> | 2010-11-26 15:50:40 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2010-11-26 15:50:40 +0100 |
commit | 4101091756a98d78cde0d6b2d88959dae324e860 (patch) | |
tree | 381a04979e9896d850e8046725f4a42500618e53 /lib/stdlib/src/supervisor.erl | |
parent | 7d64d49f19eb014188e0f3ff7cb3705255389f10 (diff) | |
parent | 4673e53596e53b303e277e99f4cd4ca21193a6ef (diff) | |
download | otp-4101091756a98d78cde0d6b2d88959dae324e860.tar.gz otp-4101091756a98d78cde0d6b2d88959dae324e860.tar.bz2 otp-4101091756a98d78cde0d6b2d88959dae324e860.zip |
Merge branch 'egil/superfluous-supervisor-report/OTP-8938' into dev
* egil/superfluous-supervisor-report/OTP-8938:
Remove superfluous supervisor error report
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r-- | lib/stdlib/src/supervisor.erl | 17 |
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. |