1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 10:45:37 +02:00

Bug 269223 - Spawner broken pipe problem

This commit is contained in:
Anton Leherbauer 2009-03-19 13:21:44 +00:00
parent 5ae5f6b33a
commit bd18850a17
4 changed files with 975 additions and 963 deletions

View file

@ -12,6 +12,7 @@ JDK_INCLUDES= "$(JAVA_HOME)/include"
JDK_OS_INCLUDES= "$(JAVA_HOME)/include/$(OS)"
CC=g++
DEBUG_FLAGS = -D_UNICODE -DDEBUG_MONITOR -DREAD_REPORT
CFLAGS = -DUNICODE -I$(JDK_INCLUDES) -I$(JDK_OS_INCLUDES)
CXX=g++
CXXFLAGS=$(CFLAGS)

View file

@ -868,7 +868,7 @@ void _cdecl waitProcTermination(void* pv)
cleanUpProcBlock(pInfo + i);
#ifdef DEBUG_MONITOR
swprintf(buffer, _T("waitProcTermination: set PID %i to 0\n"),
pid,
pInfo[i].pid,
GetLastError());
OutputDebugStringW(buffer);
#endif

View file

@ -125,6 +125,17 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_rea
nBuffOffset = 0;
break;
}
else
{
// buffer overflow?
// according to msdn this happens in message read mode only
#ifdef DEBUG_MONITOR
_stprintf(buffer, _T("Buffer full - %i, bytes read: %i\n"), fd, nNumberOfBytesRead);
OutputDebugStringW(buffer);
#endif
// nNumberOfBytesRead can be 0 here for unknown reason (bug 269223)
nNumberOfBytesRead = nNumberOfBytesToRead;
}
}
}
if(nNumberOfBytesRead > 0)
@ -138,7 +149,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_rea
CloseHandle(overlapped.hEvent);
#ifdef DEBUG_MONITOR
#ifdef READ_REPORT
_stprintf(buffer, _T("End read %i\n"), fd);
_stprintf(buffer, _T("End read %i - bytes read: %d\n"), fd, nBuffOffset);
OutputDebugStringW(buffer);
#endif
#endif