[erlang-questions] Code upgrade messages

Marc Worrell marc@REDACTED
Mon Jun 8 12:20:41 CEST 2015


Thanks for the suggestions and the idea to trace the code_server.
I have checked the code_server source code, and added a trace on the post_beam_load/1 function.

                  {code_server, post_beam_load, '_'},
                  [{'_',[],[{return_trace}]}],  % dbg:fun2ms(fun(_) -> return_trace() end)
    erlang:trace(whereis(code_server), true, [call]),

Now is hoping that that function is “stable” between releases :)



> On 6 jun. 2015, at 01:52, Éric Pailleau <eric.pailleau@REDACTED> wrote:
> Hi, 
> You may 'simply' have to trace 
> delete_module(Module)
> used by code server, with dbg or other tracing tools... And catch the Module name.
> Le 5 juin 2015 10:17, Marc Worrell <marc@REDACTED> a écrit :
>> Hi, 
>> For Zotonic we would love to be able to know if any Erlang module got a code upgrade (by loading a new version). 
>> This because we use the list of exported functions to hook the module into the internal notification systems. 
>> Is it possible to have a process that receives a code-upgrade notification for any module in the running Erlang beam.smp? 
>> Best, 
>> Marc 
>> _______________________________________________ 
>> erlang-questions mailing list 
>> erlang-questions@REDACTED 
>> http://erlang.org/mailman/listinfo/erlang-questions 

More information about the erlang-questions mailing list