[Qt-interest] Qt4 & fork()

Scott Aron Bloom scott at sabgroup.com
Mon Dec 8 05:19:00 CET 2008


read the full docs.. You can use process in 2 ways.

The first, where you explicitly wait for it to start or exit...

The second, where you you connect to the qprocces's finished and started signals.  You start it in one method and then do your own thing, when its finished you have a slot that does your cleanup..

There are also io readt signals 
-Scott
--Sent from my mobile device--
-----Original Message-----
From: "Miguel Cardenas" <mfcardenas at gmail.com>
Date: Sunday, Dec 7, 2008 5:39 pm
Subject: Re: [Qt-interest] Qt4 & fork()
To: Qt-interest at trolltech.com

Hi again

I've just found that QProcess does not start a new independent process, it blocks the main Qt application and returns/aborts immediatly if don't set a wait condition that I don't need just want to launch a command line application and let it run without taking future care of it, so, should I use QProcess + QThread? I think it should be easier to fork() and exec(), three of four lines of code should solve my problem since don't require communication with the new process, just to launch it... but my doubt remains, would fork() affect the Qt application or may get unstable?

Thanks

On Wed, Dec 3, 2008 at 8:26 PM, Manuel Fiorelli <manuel.fiorelli at gmail.com> wrote:
 I cannot answer your questions, but in my opinion you should look at the class QProcess, which is '
used to start external programs and to communicate with them'

 
Manuel Fiorelli

 
_______________________________________________
 Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




-- 
Miguel Cardenas
 




More information about the Qt-interest-old mailing list