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

[REG 5.5 -> 5.6] QProcess overwrites error message from interpreter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • 5.6.0 Alpha
    • Core: I/O
    • None
    • Linux
    • 351853e04d585cc7e9098140fb50920d99597629

    Description

      Consider this script:

      #!/no/such/file
      

      Assume it is in a file called exe.sh. Now we call it from QProcess:

      #include <QProcess>
      #include <QtDebug>
      
      int main()
      {
          QProcess p;
          p.start("./exe.sh");
          p.waitForStarted();
          qDebug() << p.errorString();
      }
      

      Output from Qt 5.5:

      No such file or directory
      

      This comes from the system and gives the actual reason for the error.
      Output from Qt 5.6 (current git HEAD):

      Process failed to start
      

      This is a generic error message that does not add anything to the information already available from QProcess' error type.
      The likely culprit is commit 5147f73ac3.

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            kandeler Christian Kandeler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes