[erlang-questions] erlang server process, how to stop it?

Serge Aleynikov saleyn@REDACTED
Tue Jul 15 13:28:03 CEST 2008


I use a convenient erl_call utility under lib/erl_interface*/bin (I wish 
it was symlinked or placed under the bin folder) to shutdown a running node:

erl_call -n $NODENAME -a 'init stop'

Note that if this is run not on the same host as the node or if the 
$NODENAME is started with a custom COOKIE as an argument, you must 
supply the same cookie to erl_call.

Serge

Caspar Florian Ebeling wrote:
> When I start an erlang process as a server, in the
> unix sense, what is the preferred way to stop it?
> I have an application callback module now, and
> I would like to have it perform shutdown handlers
> as well, but when I send an SIGTERM, erl
> goes away with an exit code != 0 and no handlers
> being invoked.
> 
> Should I go over an -sname and do something
> pseudo-distrubuted to achieve that?
> 
> Florian




More information about the erlang-questions mailing list