gen_server code_change
Peter H|gfeldt
peter@REDACTED
Tue Apr 10 13:24:43 CEST 2001
Of the high-level code replacement instructions, only *update* can
cause the code_change function to be called. It does that if and only
if the Change element of the instruction is equal to {advanced, Extra}.
/Peter
-------------------------------------------------------------------------
Peter Högfeldt e-mail : peter@REDACTED
Open Telecom Platform Phone: : +46 (8) 727 57 58
Ericsson Utvecklings AB Mobile : +46 070-519 57 51
S-126 25 STOCKHOLM Fax: : +46 (8) 727 5775
Office address: Armborstvägen 1, Älvsjö
On Tue, 10 Apr 2001, Tony Pedley wrote:
> Hi,
> 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
>
> However in pursuit of a ongoing bug, I have begun to doubt that notion,
> even to the point
> of writing a simple gen_server and trying it. I have so far been unable
> to generate a code_change event.
>
> So the question is, in a gen_server does the code_change function have
> to be called explicitly by some
> release script or is it triggered by the actual process of loading a new
> module?
>
> If it is the latter is there any case when the function is not called?
> (version numbers, identical code size etc)
>
> Thanks
>
> Tony
>
More information about the erlang-questions
mailing list