aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/supervisor.erl
diff options
context:
space:
mode:
authorRory Byrne <[email protected]>2015-06-08 23:23:58 +0100
committerRory Byrne <[email protected]>2015-06-09 00:02:01 +0100
commit16212e0495c43e5cba11aeddd0adc9da520b3f45 (patch)
tree70260223efaa1cc3a5f8e70d58046decdd8c7e05 /lib/stdlib/src/supervisor.erl
parentf1dede329de90e4805cd21a43bb5b19e288c81a3 (diff)
downloadotp-16212e0495c43e5cba11aeddd0adc9da520b3f45.tar.gz
otp-16212e0495c43e5cba11aeddd0adc9da520b3f45.tar.bz2
otp-16212e0495c43e5cba11aeddd0adc9da520b3f45.zip
Fix supervisor reporting error
When a simple_one_for_one supervisor is shutting down, if one or more of its children fail to terminate within the 'shutdown' timeout, then the following reporting error will occur: * If there is only one child that fails to exit on time, then no supervisor report will be generated. * If more than one child fails to exit on time, then the reporting of 'nb_children' in the supervisor report will be 1 less than it should be.
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r--lib/stdlib/src/supervisor.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 1d7396adee..32718a7959 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -1079,7 +1079,7 @@ wait_dynamic_children(#child{restart_type=RType} = Child, Pids, Sz,
{timeout, TRef, kill} ->
?SETS:fold(fun(P, _) -> exit(P, kill) end, ok, Pids),
- wait_dynamic_children(Child, Pids, Sz-1, undefined, EStack)
+ wait_dynamic_children(Child, Pids, Sz, undefined, EStack)
end.
%%-----------------------------------------------------------------