Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2003-01-27 20:57:14 +0000
committerAlain Magloire2003-01-27 20:57:14 +0000
commit01c7d568b7bb0498129f8c1a2f4607bc405c6021 (patch)
treebd55efc7b0c3c1dec5977722b4f98d24c7372e17 /core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
parent9387b687f52baa4de0d298a19135ffe0e89837e7 (diff)
downloadorg.eclipse.cdt-01c7d568b7bb0498129f8c1a2f4607bc405c6021.tar.gz
org.eclipse.cdt-01c7d568b7bb0498129f8c1a2f4607bc405c6021.tar.xz
org.eclipse.cdt-01c7d568b7bb0498129f8c1a2f4607bc405c6021.zip
Synchronization error fix.
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c11
1 files changed, 7 insertions, 4 deletions
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];

Back to the top