|
upgrade of supervisors child specifications: msg#00388lang.erlang.general
greetings, how do i change (when doing an upgrade) the contents of a supervisors child specifications? background: there exists a supervisor with its children. the output of supervisor:which_children(my_supervisor) => [{Id, Child,Type,Modules}, ...] due to reasons it has been decided to change Id to OtherId during upgrade. i have identified the other places where Id is stored (ets/mnesia tables) and successfully transformed these tables. now i need to change the contents of my_supervisor's child specifications. the code in supervisor.erl hints at a tantelising possiblity: code_change(_, State, _) -> case apply(State#state.module, init, [State#state.args]) of {ok, {SupFlags, StartSpec}} -> case catch check_flags(SupFlags) of ok -> update_childspec(State, StartSpec); as one can see StartSpec is returned from <my_supervisors_module>:init/1. is this possible to use? how? (ie, when/why is supervisor:code_change/3 called) it is fine to just point me to the right place in the documentation. bengt |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: mnesia:match_object() on an ordered_set: 00388, Sean Hinde |
|---|---|
| Next by Date: | Re: upgrade of supervisors child specifications: 00388, Martin Bjorklund |
| Previous by Thread: | Erlang in a french magazine (L'informaticien)i: 00388, Mickael Remond |
| Next by Thread: | Re: upgrade of supervisors child specifications: 00388, Martin Bjorklund |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |