diff --git a/core/org.eclipse.cdt.core.win32/library/iostream.c b/core/org.eclipse.cdt.core.win32/library/iostream.c index bbce17fa2db..03b776b6ee6 100644 --- a/core/org.eclipse.cdt.core.win32/library/iostream.c +++ b/core/org.eclipse.cdt.core.win32/library/iostream.c @@ -145,6 +145,15 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_rea nBuffOffset += nNumberOfBytesRead; if(nNumberOfBytesRead != nNumberOfBytesToRead) break; + else + { + // Is there data left in the pipe? + DWORD bytesAvailable = 0; + if (!::PeekNamedPipe((HANDLE)fd, NULL, 0, NULL, &bytesAvailable, NULL) + || bytesAvailable == 0) + // No bytes left + break; + } } CloseHandle(overlapped.hEvent); #ifdef DEBUG_MONITOR diff --git a/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll b/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll index c4f44ce32e2..faa495606a1 100644 Binary files a/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll and b/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll differ