[erlang-patches] Fix one_for_all and rest_for_one supervisor multiple restarts
Thu Apr 4 14:05:49 CEST 2013
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:
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 fix-server-multi-restart
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-patches