[Interest] Process isolation with Qt - how to communicate with child processes

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Mon Jan 4 22:37:57 CET 2016


Hi Alan,

I am using QProcess already, but I was talking about the sub-process code
itself.

Etienne


2016-01-04 21:11 GMT+01:00 Alan Ezust <alan.ezust at gmail.com>:

> I would recommend using the QProcess class. It emits signals when you need
> to read data from it.
>
>
> On Mon, Jan 4, 2016 at 9:00 AM, Etienne Sandré-Chardonnal <
> etienne.sandre at m4x.org> wrote:
>
>> Dear All,
>>
>> I have a server app which currently spawns threads for processing tasks
>> from incoming connections.
>>
>> I need to isolate these tasks in processes instead of threads (there are
>> several reasons for this, including the fact that tasks will run possibly
>> bugged plugin code and this should not crash the server process).
>>
>> What is the best Qt way to communicate with the child processes? I have
>> first thought using standard input/output, but it seems that it's
>> impossible to wait for incoming data from stdin without polling. The other
>> alternative I see is TCP Sockets, but is there an overhead? The amount of
>> data may be quite large (a few MB/s).
>>
>> Thanks for your hints!
>>
>> Etienne
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160104/9cd51565/attachment.html>


More information about the Interest mailing list