On 25/08/16 11:46, FreeSlave wrote:
On Thursday, 25 August 2016 at 07:32:29 UTC, Shachar Shemesh wrote:
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/[email protected] has
discussion and some code regarding this issue.

Shachar

It's not about daemonization only. Different process group is needed to
prevent signal distribution. Again, e.g. file manager and launched
application may want to not be connected in any way.

Yes, that's part of daemonization. So is chdir somewhere else and closing all open file descriptors, including stdin/out/err.

http://0pointer.de/public/systemd-man/daemon.html#SysV%20Daemons

Reply via email to