[erlang-questions] How to upgrade running applications repeatedly

Roger Larsson roger.larsson@REDACTED
Thu Jun 7 23:28:43 CEST 2007

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.
Simple test move this part to another module.
(But I think the real solution would be to use spawn_link)


More information about the erlang-questions mailing list