Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2009-10-16 05:06:14 -0400
committerAnton Leherbauer2009-10-16 05:06:14 -0400
commit5e58b2deb181911bcc86405aacb9aaace3604122 (patch)
treefa52a366cc327f935c8f048c52e28c672e5a78c9 /core/org.eclipse.cdt.core.win32/library
parent54d204a9859fdc88286e668248ffb6ec68a816b2 (diff)
downloadorg.eclipse.cdt-5e58b2deb181911bcc86405aacb9aaace3604122.tar.gz
org.eclipse.cdt-5e58b2deb181911bcc86405aacb9aaace3604122.tar.xz
org.eclipse.cdt-5e58b2deb181911bcc86405aacb9aaace3604122.zip
[292127] Reading process output blocked when message length is exactly 1024, patch by Thierry Goldwaser
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/iostream.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/iostream.c b/core/org.eclipse.cdt.core.win32/library/iostream.c
index bbce17fa2d..03b776b6ee 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

Back to the top