Avoid zombie processes with std.process

Shachar Shemesh via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 25 00:32:29 PDT 2016


On 24/08/16 14:04, FreeSlave wrote:
> Are there plans on adding something like spawnProcessDetached that would
> start processes completely independent from parent? I.e. in other
> process group and, what is important, with no need for wait.
>
> On Posix that could be done via double fork technique. Not sure about
> Windows.

Double fork on Posix is, usually, used for something slightly different. 
In particular, since you bring up the process group, I think you mean 
daemonization.

Daemonization, however, does a bit more than create a new process group 
and double forking.

http://forum.dlang.org/thread/d83ugn$265f$1@digitaldaemon.com has 
discussion and some code regarding this issue.

Shachar


More information about the Digitalmars-d mailing list