[erlang-questions] How to upgrade running applications repeatedly
Matthias Lang
matthias@REDACTED
Thu Jun 7 23:45:29 CEST 2007
Roger Larsson writes:
> I think that this is your problem
>
> On Thursday 07 June 2007 22:06, Bo wrote:
> > start_server(L) ->
> > process_flag(trap_exit, true),
> > register(test,
> > spawn(fun() ->
> > process_flag(trap_exit, true),
> > Val= (catch ?MODULE:server_loop([L])),
> > io:format("Server terminated with:~p~n",[Val])
> > end)).
>
> This one function that will not upgrade itself. Requiring the
> original version to remain in memory.
You're right, I missed that.
> Simple test move this part to another module.
> (But I think the real solution would be to use spawn_link)
spawn_link on its own will make the problem more obvious, but it won't
make it go away.
Matthias
More information about the erlang-questions
mailing list