On sábado, 25 de março de 2017 09:03:28 PDT David Faure wrote:
> On samedi 25 mars 2017 16:50:37 CET Thiago Macieira wrote:
> > One problem is because the launched process inherits the pipes to stdout
> > and stderr
> 
> Really, even with startDetached? I assumed that was more "detached" than
> that 

But you may want:

        int fd = open("/dev/null", O_RDWR);
        dup2(fd, STDIN_FILENO);
        dup2(fd, STDOUT_FILENO);
        dup2(fd, STDERR_FILENO);
        close(fd);

Like I said, this may be useful to add as a flag to QProcess::startDetached 
too.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

Reply via email to