The program which stops even run without "&":

#!/usr/bin/rdmd
import std.stdio;
import std.file;
import std.string;

import core.sys.posix.unistd;
import core.stdc.errno;
import core.stdc.string;

void main()
{
    int res = core.sys.posix.unistd.tcsetpgrp(0, getppid());
    if (res != 0)
    {
writefln("tcsetpgrp error: %s", fromStringz(strerror(errno)).idup());
        return;
    }

    foreach (line; stdin.byLine)
    {
        writefln(line);
    }
}


But really it is not decision.. The program stops not because where is no input, but because there is other process reading terminal..
It is not that I need..

Reply via email to