diff options
author | Magnus Henoch <[email protected]> | 2016-09-05 15:28:44 +0100 |
---|---|---|
committer | Magnus Henoch <[email protected]> | 2016-09-05 15:28:44 +0100 |
commit | 2a56d0ed91c1c5e18008d1cf37406f36b46b4e62 (patch) | |
tree | e4f14e4754ab3e3b180b1b116005bafeb857c538 /lib/stdlib | |
parent | 076098cebd1885ec5a56575d910322a6f1de67ff (diff) | |
download | otp-2a56d0ed91c1c5e18008d1cf37406f36b46b4e62.tar.gz otp-2a56d0ed91c1c5e18008d1cf37406f36b46b4e62.tar.bz2 otp-2a56d0ed91c1c5e18008d1cf37406f36b46b4e62.zip |
Don't report error for shutdown exit tuple
When a simple_one_for_one supervisor is shutting down, and a child
exits with an exit reason of the form {shutdown, Term}, handle it as
if the exit reason were 'shutdown', without printing an error report.
This makes the behaviour of wait_dynamic_children match that of
do_restart.
This fixes ERL-163.
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/src/supervisor.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl index c81e72689c..1cd65fbf18 100644 --- a/lib/stdlib/src/supervisor.erl +++ b/lib/stdlib/src/supervisor.erl @@ -1087,6 +1087,10 @@ wait_dynamic_children(#child{restart_type=RType} = Child, Pids, Sz, wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1, TRef, EStack); + {'DOWN', _MRef, process, Pid, {shutdown, _}} -> + wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1, + TRef, EStack); + {'DOWN', _MRef, process, Pid, normal} when RType =/= permanent -> wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1, TRef, EStack); |