[erlang-questions] Starting Erlang as a Unix daemon
Joe Armstrong
erlang@REDACTED
Thu Jan 8 15:10:46 CET 2009
Read
http://www.sics.se/~joe/tutorials/web_server/web_server.html#m2
This is specific to red-hat - but it is pretty easy to adapt to other
*nix systems
/Joe Armstrong
On Wed, Jan 7, 2009 at 7:53 AM, Sam Bobroff <samb@REDACTED> wrote:
> Hello everyone,
>
> I'm working on a project in Erlang that needs to run as a daemon on a
> Unix machine. I would like to provide feedback from the init script
> that starts the daemon but I'm having trouble finding a good way of
> doing it. For example, I would like this to happen from the shell:
>
> # /etc/init.d/foo start
> Starting foo... OK
>
> or
>
> # /etc/init.d/foo start
> Starting foo... FAILED
>
> (If there was a fatal error during startup.)
>
> I've tried using both "run_erl" and "erl -detached" but both of them
> seem to fork and exit before any user code is run.
>
> Does anyone know a good way to handle this?
>
> Thanks in advance,
> Sam.
> --
> Sam Bobroff | sam@REDACTED | M5 Networks
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list