[Interest] Piping data between QProcesses

Petko Ditchev pditchev at gmail.com
Thu May 29 00:56:48 CEST 2014

I'd love to give back to the project, but I'm not confident I know 
enough on the topic to write the method myself. I started reading some 
in-depth stuff on pipes,etc. very recently and still haven't read much 
on sockets.


On 5/29/2014 1:05 AM, Thiago Macieira wrote:
> Em qua 28 maio 2014, às 23:07:41, qt.dantec at free.fr escreveu:
>> Le Sat, 24 May 2014 13:50:45 -0700, Thiago Macieira
>> <thiago.macieira at intel.com>  écrivait:
>>> Em sáb 24 maio 2014, às 19:15:51, Petko Ditchev escreveu:
>>>> [...] I guess I can't call this function a few times for different
>>>> processes though ?
>>> That question doesn't make sense. Each process has exactly one stdout.
>> Thiago,
>> I believe the underlying question is : Is there a Qt way to send the
>> same information to different process ?
> Yes, on Linux you can, but not with QProcess. QProcess will not give you the
> file descriptors for the pipes. If it did, you could simply send the pipe to
> another process via Unix socket file descriptor passing. Just remember to tell
> QProcess to closeWriteChannel(), as two processes can't read from the same
> pipe at the same time. (ENOTOBACCO - Empty pipe)
> If you really need this, you can hack QProcess and add the method. I might
> even accept a contribution for Qt 5.4 with the new methods. QFile and
> QAbstractSocket give you a file descriptor, so why not QProcess?
> Getting the file descriptors might be useful in other scenarios as well. For
> example, you may need to do some ioctls.

More information about the Interest mailing list