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

        1. QTBUG-49286.tar
          10 kB
          Christian Kandeler
        For Gerrit Dashboard: QTBUG-49286
        # Subject Branch Project Status CR V

        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