summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_win.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-08-27 20:20:34 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-08-27 22:29:28 +0000
commit6d51697f1d4a5b1d0d57efca29a8d81a591567bd (patch)
treeb4cc5ab53bf3e8ce4c1ce02106f17df0bd8699e6 /src/corelib/io/qprocess_win.cpp
parent3fe645ecc9aaf4522183c39f5c9a78ebc1c90674 (diff)
parentafab1546a7665bac2a8d7a6452e6aea46bfd2127 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r--src/corelib/io/qprocess_win.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 5c9db05eff..e77249975c 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -694,13 +694,15 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
return true;
// If we wouldn't write anything, check if we can read stdout.
- if (bytesAvailableInChannel(&stdoutChannel) != 0) {
+ if (stdoutChannel.pipe[0] != INVALID_Q_PIPE
+ && bytesAvailableInChannel(&stdoutChannel) != 0) {
tryReadFromChannel(&stdoutChannel);
timer.resetIncrements();
}
// Check if we can read stderr.
- if (bytesAvailableInChannel(&stderrChannel) != 0) {
+ if (stderrChannel.pipe[0] != INVALID_Q_PIPE
+ && bytesAvailableInChannel(&stderrChannel) != 0) {
tryReadFromChannel(&stderrChannel);
timer.resetIncrements();
}