[erlang-questions] Why does the restart strategy "{one_for_one, 10, 10}" still kill my application?

Shelton Tang shelton.ms@REDACTED
Fri Oct 6 13:44:26 CEST 2006


get it. I'm thinkg how to change the code and test it again.  thank you.

On 10/5/06, Taavi Talvik <taavi@REDACTED> wrote:
>
> On Oct 4, 2006, at 8:33 PM, Shelton Tang wrote:
>
> > Hi Gunilla,
> >
> > Thank you for the info. When I start erl with "erl -boot start_sasl",
> > the last outuput shows the sup shutdown is because of one child
> > shutdown. The child calls gen_tcp:listen/2 but got eaddrnotavail since
> > i got a wrong IP from inet:getiflist.
> >
> > so my question is, do I need to trap_exit in my supervisor?
>
> Your problem seems to be in application startup phase.
>
> As principle:
>        child init function should succeed and real work
>        should be done in server "runtime" logic
>
>        this allows supervisory hierarchy started and
>        errors are later handled as normal runtime errors
>
>        supervisor assumes, that initialization is lightweight
>        operation - something like passing parameters
>
> best regards,
> taavi
>
>



More information about the erlang-questions mailing list