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

Bengt Kleberg eleberg@REDACTED
Thu Jan 10 07:46:02 CET 2002


> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Thu, 10 Jan 2002 00:31:01 +0100
> From: matthias@REDACTED

...deleted

> 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.

According to Stevens (Advanced UNIX Programing) it is even neccessary with a 
second fork() after the setsid(). Provided that you have an old system. 
Presumably a modern UNIX does not need either?


bengt




More information about the erlang-questions mailing list