[Qt-interest] QProcess::execute -- help

Jason H scorp1us at yahoo.com
Wed Jun 9 03:19:26 CEST 2010


Oh, I am sorry, I missed the important bit.

When you close the console, the signal HUP (hang up, from modem days) is sent to all child processes of that shell.

You need to protect your process with 'nohup' (unix commandline utility) that will block the HUP from reaching your process.





________________________________
From: pmqt71 <pmqt71 at gmail.com>
To: qt-interest at trolltech.com
Sent: Tue, June 8, 2010 7:41:51 PM
Subject: [Qt-interest] QProcess::execute -- help



Hi all,

I'm using QProcess::execute in my Qt server application to run a script on the server side (Ubuntu 64 bit). It works fine when I run my app, but doen't work when I close the console.

the application is alive because I run it in background ( ./myApp& ) and I find it in the ps list, but the script is not executed.

I'm using both a relative and fixed path, also I tried the system function:

QProcess::execute("./myScript &");
QProcess::execute("/entire/path/myScript &");
QProcess::execute("./myScript");
QProcess::execute("/entire/path/myScript");
system("/entire/path/myScript &");

but without success.

Please help me!
pm



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100608/1450c41d/attachment.html 


More information about the Qt-interest-old mailing list