Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
None
-
SDKs:
Nokia S60 5th Edition SDK
Qt 4.7.0 SDK
Open C 1.7.5
Devices and Tools:
Nokia E51, E52 and N97 with Qt 4.7.0
Qt Creator 2.01
Windows 7 x64
-
5657b8f13bd6ef456a1da7ae08a2924e256b8ea3
Description
After a process has finished (QProcess::finished / waitForFinished()) the process should be closed? With 4.7.0 on Symbian S60 this is not the case. When starting a Qt console application from another Qt console application the child process seems to be in the background (as a zombie) until the parent application is closed.
This behavior causes serious problems if a parent runs constantly in the background and starts periodically different child processes. At some the Symbian OS is jammed because the process limit has been reached (e.g. 256 on E51). Here is a small example:
int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QTimer::singleShot(10000, &a, SLOT(quit())); return a.exec(); }
int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QProcess *process = new QProcess(&a); process->start("childprocess.exe"); if(process->waitForStarted()) { process->waitForFinished(-1); } delete process; return a.exec(); }
If you investigate the running processes when the main enters into event loop you can see that the child is still running in the background. When you close the main application both processes are terminated. In order to see running processes use some 3rd party task managers (e.g. YTasks: http://www.drjukka.com/YTasks.html).
Later on I'll upload some test applications and provide some additional details.