Standard unix daemon

Serge Aleynikov <>
Sun Apr 2 17:07:44 CEST 2006


You can run a distributed node using "-sname NAME" option, and use 
another instrance of Erlang to force a distributed stop like this:

$ run_erl -daemon tmp/pipe/ tmp/log/ \
     "exec erl -sname a -boot fanterlasticfour"

$ erl -eval "case rpc:call(a@`hostname -s`, init, stop, []) of " \
             "ok -> erlang:halt(0); " \
             "_  -> erlang:halt(1)  " \
             "end." \
       -hidden -noshell

Or you can acomplish the same using erl_call utility (see: "erl -man 
erl_call"):

$ erl_call -sname a -a "init stop"

Serge

Pupeno wrote:
> Hello,
> 
> On Sunday, 2 de April de 2006 01:32, Serge Aleynikov wrote:
> 
>>2. Use run_erl / start_erl to start Erlang.
>>
>>http://www.erlang.org/doc/doc-5.4.13/erts-5.4.13/doc/html/run_erl.html
> 
> Ok,
> So I run my application:
> 
> $ run_erl -daemon tmp/pipe/ tmp/log/ "exec erl -boot fanterlasticfour"
> 
> now, how do I stop it ?
> 
> Thanks.




More information about the erlang-questions mailing list