[erlang-questions] init:restart in a gen_server

Joel Reymont joelr1@REDACTED
Fri Nov 30 16:28:25 CET 2007


Folks,

Are there any conditions under which init:restart/0 would stop working?

It works fine on a local node when triggered from the Erlang shell.

I have gen_server code that looks like this

handle_cast('RESTART', Self) ->
     F = fun() -> init:restart() end,
     spawn(F),
     {noreply, Self};

and it doesn't seem to work when 'RESTART' is received.

What I mean by doesn't seem to work is that the apps are not  
restarted, at least according to log files.

Any suggestions?

	Thanks, Joel

--
http://wagerlabs.com








More information about the erlang-questions mailing list