Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-14735

Problem with QProcess and "zombie" processes on Symbian

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 4.7.2
    • 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

      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:

      Child process main.cpp
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
          QTimer::singleShot(10000, &a, SLOT(quit()));
          return a.exec();
      }
      
      Parent application main.cpp
      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.

        1. proc_tests.zip
          4 kB
          Tuomo Timonen
        2. symbian_proc_tests.zip
          16 kB
          Miikka Heikkinen
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            axisnokia axisnokia (Inactive)
            tuomo_timonen Tuomo Timonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes