Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27461

Remove QtcProcess::stopProcess() method

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • None
    • None
    • All Other Issues
    • None
    • All

    Description

      This method isn't really sensible and reliable. The current implementation looks like:

      void QtcProcess::stopProcess()
      {
          if (state() == QProcess::NotRunning)
              return;
          terminate();
          if (waitForFinished(300))
              return;
          kill();
          waitForFinished(300);
      }
      

      Why not sensible? Do we really care about the safe terminate still relying on signals delivery? If so, why after 300 we resign from it?

      Don't we rely on signals delivery? Then we should call close() or delete the process - process termination will be passed to the ProcessReaper.

      Why not reliable? It may happen that neither terminate nor kill finished the process and we are in the same state as without calling it.

      It looks like we are currently having about 25 usages of this method - they all should be supervised.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jkobus Jarek Kobus
            jkobus Jarek Kobus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes