1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +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,7 +12,8 @@ JDK_INCLUDES= "$(JAVA_HOME)/include"
JDK_OS_INCLUDES= "$(JAVA_HOME)/include/$(OS)"
CC=g++
CFLAGS = -DUNICODE -I$(JDK_INCLUDES) -I$(JDK_OS_INCLUDES)
DEBUG_FLAGS = -D_UNICODE -DDEBUG_MONITOR -DREAD_REPORT
CFLAGS = -DUNICODE -I$(JDK_INCLUDES) -I$(JDK_OS_INCLUDES)
CXX=g++
CXXFLAGS=$(CFLAGS)

File diff suppressed because it is too large Load diff

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