diff --git a/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/spawner.dll b/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/spawner.dll index 3d36e1ac6df..7192bf286c2 100644 Binary files a/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/spawner.dll and b/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/spawner.dll differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll index 5c30101fa1a..3dba4a71679 100644 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll differ diff --git a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c index c23bc32ae29..aa60b4a919b 100644 --- a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c +++ b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c @@ -669,7 +669,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_raise OutputDebugStringW(buffer); #endif - hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, pCurProcInfo -> pid); + hProc = OpenProcess(SYNCHRONIZE, 0, pCurProcInfo -> pid); if(NULL == hProc) return -1; @@ -740,7 +740,7 @@ extern "C" JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_waitFor (JNIEnv * env, jobject process, jint uid) { - DWORD exit_code; + DWORD exit_code = -1; int what=0; HANDLE hProc; pProcInfo_t pCurProcInfo = findProcInfo(uid); @@ -748,7 +748,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_waitFor if(NULL == pCurProcInfo) return -1; - hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, pCurProcInfo -> pid); + hProc = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION, 0, pCurProcInfo -> pid); if(NULL == hProc) return -1;