No subject

Sean Hinde Sean.Hinde@REDACTED
Mon Oct 25 18:05:35 CEST 1999

> 2) Create a 'supervisor' with one child which receives a message from
>    alarm_handler if your module crashes.  If this happens, this child
>    process calls exit/1, and the supervisor restarts the child, which
>    reinstalls the handler module in alarm_handler.
>    Here's some code to do the trick:
> /martin

I used your code with a few changes to allow passing in the handler names as
startup data (and fixing the loop call arity). Fantastic, thanks.

Out of interest, why did you choose to implement this as a 'made up'
behaviour rather than using gen_server. Is the reason performance /
simplicity, or something subtle to do with the functionality of the startup
mechanism which can't be achieved using standard behaviours.


More information about the erlang-questions mailing list