[Interest] QProcess: child read from stdin - no data received?

Till Oliver Knoll till.oliver.knoll at gmail.com
Mon May 14 16:04:39 CEST 2012


2012/5/14 Till Oliver Knoll <till.oliver.knoll at gmail.com>:
> 2012/5/13 Thiago Macieira <thiago.macieira at intel.com>:
>> On domingo, 13 de maio de 2012 18.36.02, Till Oliver Knoll wrote:
>>> this seems to be an ever recurring topic: How does one get notified in a
>>> child process (started via QProcess) once there is data to be read on
>>> stdin (in a platform-independent matter - but for now mostly OS X)?
>>
>> There isn't a platform-independent way.
>
> And yet there is a Qt API on the "sender side" (parent process) via
> QProcess which seems to provide exactly that.

I stumbled about this 2007 post which summarises very nicely all the
pitfalls and minefields with stdin/stdout on different platforms:

  http://lists.trolltech.com/qt-interest/2007-07/msg00841.html

A longer, but very informative post. And I think most of it is still
valid as of today, when I compare it with my most recent own
experience with QFile on stdin. ;)

I like this quote here:

"What surprises me the most is that a filter is a one of the most
simple UI design patterns. How come this is all so complicated? Or did
I go wrong somewhere on the way?"



Apparently a never-ending story, given the amount of people (according
to Google) that try to do asynchronous IPC with Qt and stdin/out - and
finally give up ;)


Cheers, Oliver



More information about the Interest mailing list