[erlang-questions] otp supervisor terminate callback
Sat Apr 20 11:34:05 CEST 2013
To get the terminate/1 callback in a gen_server or gen_fsm behaviour module
what you would do is to set the process flag to trap exits in your init/1
On Apr 20, 2013 4:34 PM, "Seven Du" <dujinfang@REDACTED> wrote:
> I'd like to know is it possible to have a terminate callback that clean up
> things when the supervisor stops?
> Specifically I want to write an application which starts a supervisor, and
> add a handler to some existing gen_event by calling gen_event:add_handler()
> on init(), and I want to call gen_event:remove_handler() when the
> application is stop. Is there an easy way to do it?
> Seven Du
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions