[Interest] Redirect stdout to a file

Thiago Macieira thiago.macieira at intel.com
Tue Jul 2 06:07:43 CEST 2013


On segunda-feira, 1 de julho de 2013 16.31.19, Yifei Li wrote:
> Hi folks,
> 
> I know this can be done using QProcess::setStandardOutputFile.
> 
> However, I need to start my process using the static function
> startDetached, and still want to be able to redirect its stdout/stderr to
> another file.
> 
> Any suggestions?

There's no such feature and no workaround either. All startDetached() 
overloads are static, which means they don't take any extra configurations and 
there's no child-process function that you can execute.

I implemented the redirection code in 2006. As far as I remember, you're the 
first to want to redirect a detached process.

Other people have requested the ability to detach a process that is already 
started, but that simply can't be implemented. At best, we could implement a 
"disown" functionality.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130701/f1c300cb/attachment.sig>


More information about the Interest mailing list