[erlang-patches] Fix supervisor doc: Shutdown, MaxR and MaxT type specs

Ricardo Catalinas Jiménez <>
Fri Feb 24 15:10:04 CET 2012


The next code snippets from supervisor.erl show that Shutdown from a
child specification must be greater than zero and the same applies to
MaxT.

--- supervisor.erl ----------------------------------------------------------
validShutdown(Shutdown, _)
  when is_integer(Shutdown), Shutdown > 0 -> true;
validShutdown(infinity, _)             -> true;
validShutdown(brutal_kill, _)          -> true;
validShutdown(Shutdown, _)             -> throw({invalid_shutdown, Shutdown}).

validIntensity(Max) when is_integer(Max),
                         Max >=  0 -> true;
validIntensity(What)               -> throw({invalid_intensity, What}).

validPeriod(Period) when is_integer(Period),
                         Period > 0 -> true;
validPeriod(What)                   -> throw({invalid_period, What}).
-----------------------------------------------------------------------------

I fixed the supervisor doc and made minor cosmetic changes.


Please fetch:
git fetch git://github.com/jimenezrick/otp.git fix-supervisor-shutdown-doc

Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...fix-supervisor-shutdown-doc
https://github.com/jimenezrick/otp/compare/erlang:maint...fix-supervisor-shutdown-doc.patch


Regards
-- 
Ricardo (http://r.untroubled.be/)


More information about the erlang-patches mailing list