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

Gustav Simonsson gustav@REDACTED
Fri Mar 2 16:40:56 CET 2012


Hi Ricardo,
This patch looks good, we'll include it (possibly with some edits) into 
the 'pu' branch.
Thank you for the contribution!

Regards,
Gustav Simonsson
Erlang/OTP team

On 2012-02-24 15:10, Ricardo Catalinas Jiménez wrote:
> 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




More information about the erlang-patches mailing list