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

QProcess never quit close() function if my executable use system("pause") or getchar() function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.1.0
    • Core: I/O
    • None
    • Windows 7 Pro x64

      Create a basic executable with system("pause") function or getchar() function.
      This is the code (same than exeTest.exe in attached file):
      #include <iostream>
      #include <Windows.h>

      int main (int argc, char* argv[])
      {
      system("pause");
      return 0;
      }

      Code to test the bug:
      QProcess *test = new QProcess();
      test->start("exeTest.exe");
      test->waitForStarted(1000);

      test->close(); // exeTest is closed in task but we never quit close() function. It happens also if we try to delete pointer without calling close() function
      delete test;

      I didn't have this problem with previous version of Qt (4.7.4) but I have it with Qt5 (I tried with Qt 5.0.2 and 5.1.0)

        1. qtbug32441.tar
          20 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            biochimia João Abecasis
            fgu123 Florian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes