The GUI has ended after exec() returns.
If you want to keep the event loop running until all event based jobs are finished, have a look at QEventLoopLocker.
Well, obviously the best solution would involve not having to copy the data from one process to another.
But you could try avoiding the continuous allocation and deallocation of memory.
I.e. allocate a buffer once and then use it to read from the socket and write to the process using the read/write methods that take char* for the data.
Cheers,
_
Bookmarks