aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-02-14 15:57:51 +0100
committerHenrik Nord <[email protected]>2014-02-14 15:58:08 +0100
commited2c247a0f1b30f899929ed1231566b29d86dc47 (patch)
tree7f98e60c36346b4416e9aa11c8a5d89cb0c58020
parent6b5ee6c33d6e8109741be1030ea94932979f81cd (diff)
parent6fff160604ccf60fa8682387d66f3d631c6e9030 (diff)
downloadotp-ed2c247a0f1b30f899929ed1231566b29d86dc47.tar.gz
otp-ed2c247a0f1b30f899929ed1231566b29d86dc47.tar.bz2
otp-ed2c247a0f1b30f899929ed1231566b29d86dc47.zip
Merge branch 'galaxie/supress-normal-terminates'
* galaxie/supress-normal-terminates: Suppress error report when child was terminated normally OTP-11685
-rw-r--r--lib/stdlib/src/supervisor_bridge.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/stdlib/src/supervisor_bridge.erl b/lib/stdlib/src/supervisor_bridge.erl
index e8405ab9a4..ff4502f0b9 100644
--- a/lib/stdlib/src/supervisor_bridge.erl
+++ b/lib/stdlib/src/supervisor_bridge.erl
@@ -101,7 +101,16 @@ handle_cast(_, State) ->
{noreply, State}.
handle_info({'EXIT', Pid, Reason}, State) when State#state.pid =:= Pid ->
- report_error(child_terminated, Reason, State),
+ case Reason of
+ normal ->
+ ok;
+ shutdown ->
+ ok;
+ {shutdown, _Term} ->
+ ok;
+ _ ->
+ report_error(child_terminated, Reason, State)
+ end,
{stop, Reason, State#state{pid = undefined}};
handle_info(_, State) ->
{noreply, State}.