diff --git a/src/corelib/io/qwindowspipereader.cpp b/src/corelib/io/qwindowspipereader.cpp index cca6e80810..bef6097043 100644 --- a/src/corelib/io/qwindowspipereader.cpp +++ b/src/corelib/io/qwindowspipereader.cpp @@ -213,7 +213,8 @@ void QWindowsPipeReader::startAsyncRead() // We get notified by the QWinOverlappedIoNotifier - even in the synchronous case. return; } else { - switch (GetLastError()) { + const DWORD dwError = GetLastError(); + switch (dwError) { case ERROR_IO_PENDING: // This is not an error. We're getting notified, when data arrives. return; @@ -223,16 +224,19 @@ void QWindowsPipeReader::startAsyncRead() // didn't fit into the pipe's system buffer. // We're getting notified by the QWinOverlappedIoNotifier. break; + case ERROR_BROKEN_PIPE: case ERROR_PIPE_NOT_CONNECTED: { // It may happen, that the other side closes the connection directly // after writing data. Then we must set the appropriate socket state. + readSequenceStarted = false; pipeBroken = true; emit pipeClosed(); return; } default: - emit winError(GetLastError(), QLatin1String("QWindowsPipeReader::startAsyncRead")); + readSequenceStarted = false; + emit winError(dwError, QLatin1String("QWindowsPipeReader::startAsyncRead")); return; } } diff --git a/tests/auto/corelib/io/qprocess/test/test.pro b/tests/auto/corelib/io/qprocess/test/test.pro index 458bbca738..79ea53cc6b 100644 --- a/tests/auto/corelib/io/qprocess/test/test.pro +++ b/tests/auto/corelib/io/qprocess/test/test.pro @@ -11,7 +11,6 @@ win32:TESTDATA += ../testBatFiles/* include(../qprocess.pri) -win32:CONFIG += insignificant_test # QTBUG-25342 - sometimes hangs mac:CONFIG += insignificant_test # QTBUG-25895 - sometimes hangs for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}"