From 01c7d568b7bb0498129f8c1a2f4607bc405c6021 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Mon, 27 Jan 2003 20:57:14 +0000 Subject: [PATCH] Synchronization error fix. --- core/org.eclipse.cdt.core.win32/ChangeLog | 5 +++++ .../library/Win32ProcessEx.c | 11 +++++++---- .../os/win32/x86/spawner.dll | Bin 53248 -> 53248 bytes 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/org.eclipse.cdt.core.win32/ChangeLog b/core/org.eclipse.cdt.core.win32/ChangeLog index 7e90790b2f2..c972537d1fe 100644 --- a/core/org.eclipse.cdt.core.win32/ChangeLog +++ b/core/org.eclipse.cdt.core.win32/ChangeLog @@ -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 diff --git a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c index e9b91130d5e..29b641fe502 100644 --- a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c +++ b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c @@ -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]; diff --git a/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll b/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll index 5f7d5eb1ab7b568ffca486aa566ee4afdd0d946b..c1d88c0de1dc30dde3382cfd8a9cb00844844477 100644 GIT binary patch delta 107 zcmV-x0F?iLpaX!Q1Ca0orm!`!^Ai^Vi?at9=>`T`5MN$1z+1uu0FaQgZXd>N1E#Pwvp0>GGYbJf2R|4; NFh5a0V6)l4Cl3RnDW?Dc delta 107 zcmV-x0F?iLpaX!Q1Ca0oxGFHQ^Ai^Vjk5`akL?i@LR*Nu`_8w0sOco4L|I>xQ zbqN1Gp+Mvp0>GGYbPh2|pS? NGCxy4Vzb%6Cl9P=C^P^7