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

[REG 5.9.x->5.10.0] QProcess::startDetached: output of called process is suppressed on Windows

    XMLWordPrintable

Details

    • f0ff73f631093b11c77d8d6fb548acfe8eb62583

    Description

      There is a problem with QProcess::startDetached(Qstring &command) method. Batch file given as a command to startDetached method is not working as expected. 

      Please refer the attached project qtbug67905.zip.

      Steps to Reproduce:
        4) Run the project

      Expected Outcome: test.txt file should be made in the build directory having String "=== Batch is executed ==="

      Actual Outcome: No such File is made in case of Qt 5.10.1 and Qt 5.11.0.

      Tested on Windows 10. The issue is seen in Qt 5.10.1 and Qt 5.11.0. Batch File works fine from the command prompt. 

      The same project works properly in Qt 5.9.4 and Qt 5.9.5

      Qt 5.11.0 (x86_64-little_endian-llp64 shared (dynamic) debug build; by MSVC 2017)
       ()
      Running "C:/dev/projects/qtbug67905/hello.bat" () true
       

      vs

      Qt 5.9.6 (i386-little_endian-ilp32 shared (dynamic) release build; by MSVC 2017)
       ()
      Running "C:/dev/projects/qtbug67905/hello.bat" () true
      
      C:\dev\projects\qtbug67905_59>echo off
      "Hello world"
      

      QProcess::startDetached() returns true, but the code is not executed. Using cmd /c (option -c to qtbug67905.zip does not make a difference.

      Attachments

        1. hello.bat
          0.1 kB
        2. QProcess_Issue_1.7z
          3 kB
        3. qtbug67905.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            shmittal Shveta Mittal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes