summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r--src/corelib/io/qprocess_win.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 3a62a67e3b..b1ec2c560c 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -499,8 +499,13 @@ void QProcessPrivate::startProcess()
if (!openChannel(stdinChannel) ||
!openChannel(stdoutChannel) ||
- !openChannel(stderrChannel))
+ !openChannel(stderrChannel)) {
+ QString errorString = QProcess::tr("Process failed to start: %1").arg(qt_error_string());
+ cleanup();
+ setErrorAndEmit(QProcess::FailedToStart, errorString);
+ q->setProcessState(QProcess::NotRunning);
return;
+ }
const QString args = qt_create_commandline(program, arguments, nativeArguments);
QByteArray envlist;