1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Synchronization error fix.

This commit is contained in:
Alain Magloire 2003-01-27 20:57:14 +00:00
parent 9387b687f5
commit 01c7d568b7
3 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2003-01-27 Alex Chapiro
* os/win32/x86/spawner.dll: Rebuild
* src/library/Win32ProcessEx.c: Synchronization error fix.
2003-01-23 Alex Chapiro
* os/win32/x86/spawner.dll: Rebuild

View file

@ -308,7 +308,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
pCurProcInfo -> pid = pi.dwProcessId;
h[0] = pCurProcInfo -> eventWait;
h[1] = (HANDLE)_beginthreadex(NULL, 0, waitProcTermination,
(void *) &(pi.dwProcessId), 0, (UINT*) &dwThreadId);
(void *) pi.dwProcessId, 0, (UINT*) &dwThreadId);
what = WaitForMultipleObjects(2, h, FALSE, INFINITE);
if((what != WAIT_OBJECT_0) && (pCurProcInfo -> pid > 0)) // CreateProcess failed
@ -509,12 +509,15 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_raise
pProcInfo_t pCurProcInfo = findProcInfo(uid);
#ifdef DEBUG_MONITOR
char buffer[100];
sprintf(buffer, "Spawner received signal %i for process %i\n", signal, pCurProcInfo -> pid);
OutputDebugString(buffer);
#endif
if(NULL == pCurProcInfo)
return -1;
#ifdef DEBUG_MONITOR
sprintf(buffer, "Spawner received signal %i for process %i\n", signal, pCurProcInfo -> pid);
OutputDebugString(buffer);
#endif
hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, pCurProcInfo -> pid);
@ -684,7 +687,7 @@ void cleanUpProcBlock(pProcInfo_t pCurProcInfo)
unsigned int _stdcall waitProcTermination(void* pv)
{
int i;
int pid = *(int *)pv;
int pid = (int)pv;
DWORD rc = 0;
#ifdef DEBUG_MONITOR
char buffer[1000];