mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
[292127] Reading process output blocked when message length is exactly 1024, patch by Thierry Goldwaser
This commit is contained in:
parent
54d204a985
commit
5e58b2deb1
2 changed files with 9 additions and 0 deletions
|
@ -145,6 +145,15 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_rea
|
||||||
nBuffOffset += nNumberOfBytesRead;
|
nBuffOffset += nNumberOfBytesRead;
|
||||||
if(nNumberOfBytesRead != nNumberOfBytesToRead)
|
if(nNumberOfBytesRead != nNumberOfBytesToRead)
|
||||||
break;
|
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);
|
CloseHandle(overlapped.hEvent);
|
||||||
#ifdef DEBUG_MONITOR
|
#ifdef DEBUG_MONITOR
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue