[erlang-questions] Change a Spec of a running supervisor

Colin Z <>
Mon May 19 19:26:07 CEST 2008

In a supervisor, I use a config variable to determine what module to use in
one of its worker specifications.

Is there a way to change a spec while an application/supervisor is already

It's easy enough to change the code of an already loaded module (just
recompile), but how can I switch between using two different modules?

Specific example:
I have module for handling logins that I want my supervisor to be in charge
of. Say that I've started the application and my config variable was
"basicLoginHandler". Without bringing down the entire application, how can I
later make the supervisor terminate its "basicLoginHandler" spec and start a
new worker using a module called "advancedLoginHandler" that I've decided
should be used instead?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080519/9506f64b/attachment.html>

More information about the erlang-questions mailing list