Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.10.1, 5.11.0 Beta 4
-
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
For Gerrit Dashboard: QTBUG-67905 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
228274,14 | QProcess::startDetached: Fix behavior change on Windows | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |
235511,1 | QProcess::startDetached: Fix behavior change on Windows | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |