[erlang-questions] init:restart in a gen_server

Ulf Wiger ulf@REDACTED
Sun Dec 2 17:15:52 CET 2007


There are times when shutdown doesn't work,
or at least there used to be. If a process start function
called from a supervisor spawns, but doesn't link to the
supervisor, or explicitly unlinks, this could cause the
shutdown procedure to hang forever. But as far as I can
tell from the source, this problem has been addressed.

What can you observe? Does the node seem to shut
down correctly?

BR,
Ulf W

2007/11/30, Joel Reymont <joelr1@REDACTED>:
> 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
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list