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

QProcess::start() will not start the process until waitForFinished() called

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.6.1
    • Core: I/O
    • None
    • openSUSE Tumbleweed
      installed by online installer (as root/sudo)
    • Linux/X11

    Description

      The sample code is:

          int port = QRandomGenerator::global()->bounded(10000, 20000);
          QProcess* process = new QProcess();
          QString program = "/opt/google/chrome/google-chrome";
          QStringList arguments;
          arguments << "--headless";
          arguments << "--remote-debugging-port=" %  QLocale::c().toString(port);
          arguments << baseUrl;
          qDebug() << "Chrome Args: " << arguments;
          process->start(program, arguments, QIODevice::ReadWrite);
          if (!process->waitForStarted()) {
              qDebug() << "Can't start chrome with remote debugger";
              emit errorOccured(process->readAllStandardError());
          } else {
              qDebug() << "Chrome started with remote debugger: port = " << port;
          }
          qDebug() << "Chrome Logs: " << qPrintable(process->readAllStandardOutput());
          qDebug() << "Chrome Errors: " << qPrintable(process->readAllStandardError());
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            sauntor sauntor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes