erl -detached doesn't properly detach itself (or does it?)

Ulf Wiger etxuwig@REDACTED
Thu Jan 10 10:53:17 CET 2002

I'm to lazy to restart my PC in order to try this on Linux, but
doesn't "nohup erl ... -detached" to the trick?

It works on Solaris.


On Thu, 10 Jan 2002 matthias@REDACTED wrote:

>I was trying to get an erlang process to run as a daemon on my linux
>box using the '-detached' option at startup. This doesn't seem to
>work quite right---a background emulator is started, but it is killed
>whenever I log out of the system.
>From the 'erl' manpage:
>         -detached:
>             Starts  the  Erlang  system detached from the system
>             console. Useful for running daemons and  backgrounds
>             processes.
>Looking at the source in erlexec.c, I see the fork() calls, but I
>don't see a setsid() call. My (rusty) recollections of unix process
>groups is that you need to call setsid() to make sure you don't
>eventually get a SIGHUP.
>Or is there a reason for not calling setsid()?

More information about the erlang-questions mailing list