<div dir="ltr"><div style>Hi,</div><div style><br></div><div style><span style="font-family:arial,sans-serif;font-size:13px">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!</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><font face="arial, sans-serif">An example of this is available here: </font><a href="https://gist.github.com/fishcakez/5296408">https://gist.github.com/fishcakez/5296408</a></div>
<div style><br></div><div style>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.</div>
<div style><br></div><div style>git fetch git://<a href="http://github.com/fishcakez/otp.git">github.com/fishcakez/otp.git</a> fix-server-multi-restart</div><div><br></div><a href="https://github.com/fishcakez/otp/compare/fix-supervisor-multi-restart">https://github.com/fishcakez/otp/compare/fix-supervisor-multi-restart</a><br>
<div><a href="https://github.com/fishcakez/otp/compare/fix-supervisor-multi-restart.patch">https://github.com/fishcakez/otp/compare/fix-supervisor-multi-restart.patch</a><br></div><div><br></div><div style>King Regards,</div>
<div style>James</div></div>