gen_server code_change

Ulf Wiger etxuwig@REDACTED
Tue Apr 10 13:47:32 CEST 2001


On Tue, 10 Apr 2001, Tony Pedley wrote:

>I had always assumed up to now that the gen_server callback function
>code_change was called automatically when a new gen_server module
>was loaded into the Erlang shell(i.e l(Module)) This was partly due
>to my reading of the Erlang Reference Manual

Oh, to answer this specific question, the only thing that happens
when you call l(Module) in the shell is that the code is loaded.
To simulate an upgrade of Module, you'd have to do this:

sys:suspend(MyProc).
l(Module).
sys:change_code(MyProc, undefined, Module, Extra).
sys:resume(MyProc).


/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB





More information about the erlang-questions mailing list