From 16212e0495c43e5cba11aeddd0adc9da520b3f45 Mon Sep 17 00:00:00 2001 From: Rory Byrne Date: Mon, 8 Jun 2015 23:23:58 +0100 Subject: 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. --- lib/stdlib/src/supervisor.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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. %%----------------------------------------------------------------- -- cgit v1.2.3