Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
6.2.3
Description
Running bash commands on Linux with QProcess in 6.2 does not work the same as with 5.15. Previously, running shell commands ran and captured the output. Now it only runs, but does not capture output.
The following code is adapted from the Qt 6 QProcess documentation for running a synchronous process.
QString output; QProcess *process = new QProcess(); /* testing QProcess documentation synchronous example */ process->start("sh", QStringList() << "-c" << s); if (!process->waitForStarted()) output = "QProcess failed to start, with error [" + process->errorString() + "]"; if (!process->waitForFinished()) output = "QProcess failed to finish, with error [" + process->errorString() + "]"; output = QString(process->readAll()); delete process;
The expected behavior is that readAll() returns any output from stdout and stderr, but the actual behavior is that it returns nothing.
Attachments
Issue Links
- duplicates
-
QTBUG-100174 QProcess dead lock on kernel-4.18.0-358
- Closed
- relates to
-
QTCREATORBUG-28067 Qt Creator 6/7/8 (Qt 6) qmake doesn't exist isn't executable or has no output
- Closed