|Subject:||Re: [Qt-interest] QProcess's bug?|
|Date:||Thu, 25 Jun 2009 15:58:51 +0800|
My program looks like the following:
int main(int argc, char* argv)
Â QCoreApplication app(argc, argv);
Â if (runInDaemon)
ÂÂÂ becomeDaemonFromNowOn();Â // By means of traditional unix fork()
Â ClassUsesQProcess obj;
Â return app.exec();
ClassUsesQProcess holds a QProcess and a QTimer as its members.
The QTimer emits timeout() signal every 2 seconds so that it can periodically run shell commands.
As code above, if runInDaemon is false, everything's okay to do shell command via QProcess.
If, but, runInDaemon is true, the program will become a daemon first, then do shell command via QProcess.
In the latter case, QProcess's initial state will be QProcess::Running.
And the shell command, I want to execute, can't be run due to it's in running state.
( I get its initial state since I check and print its state first everytime prior to execute shell commands)
Anybody please figuring it out. Thanks!!
2009/6/25 Andreas Pakulat <apaku@xxxxxx>
_______________________________________________ Qt-interest mailing list Qt-interest@xxxxxxxxxxxxx http://lists.trolltech.com/mailman/listinfo/qt-interest
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [Qt-interest] Static linking, Martin Hofius|
|Next by Date:||Re: [Qt-interest] Static linking, Srdjan Todorovic|
|Previous by Thread:||Re: [Qt-interest] QProcess's bug?, Andreas Pakulat|
|Next by Thread:||Re: [Qt-interest] QProcess's bug?, Andreas Pakulat|
|Indexes:||[Date] [Thread] [Top] [All Lists]|