[erlang-patches] Fix one_for_all and rest_for_one supervisor multiple restarts
Fredrik
fredrik@REDACTED
Thu Apr 4 14:21:39 CEST 2013
On 04/04/2013 02:09 PM, James Fish wrote:
> Sorry that should be:
> git fetch git://github.com/fishcakez/otp.git
> <http://github.com/fishcakez/otp.git> fix-supervisor-multi-restart
>
>
> On 4 April 2013 13:05, James Fish <james@REDACTED
> <mailto:james@REDACTED>> wrote:
>
> Hi,
>
> When a child in a rest_for_one or one_for_all supervisor dies and
> is then restarted but a child later in the child specification
> fails to start - so that the restart fails - the restarted child's
> pid is ignored by the supervisor and is not terminated. The
> supervisor will then attempt to restart that child again - leaving
> the unaccounted for process alive!
>
> An example of this is available here:
> https://gist.github.com/fishcakez/5296408
>
> In this patch the supervisor changes the restarting child to the
> one that failed to start. In the case of one_for_all this means
> that the successfully restarted child is terminated (along with
> the other successfully restarted children). In the case of
> rest_for_one all successfully restarted children remain, and
> restarting begins with the child that failed to start. Should this
> be document? The way a rest_for_one handles this case is not
> documented.
>
> git fetch git://github.com/fishcakez/otp.git
> <http://github.com/fishcakez/otp.git> fix-server-multi-restart
>
> https://github.com/fishcakez/otp/compare/fix-supervisor-multi-restart
> https://github.com/fishcakez/otp/compare/fix-supervisor-multi-restart.patch
>
> King Regards,
> James
>
>
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
Hello James,
I have fetched your branch and a reviewing process will now start.
--
BR Fredrik Gustafsson
Erlang OTP Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130404/88aa8a38/attachment.htm>
More information about the erlang-patches
mailing list