gen_server code_change

Tony Pedley <>
Tue Apr 10 13:08:01 CEST 2001


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