diff options
author | Christian Walther | 2018-09-18 05:55:40 +0000 |
---|---|---|
committer | Doug Schaefer | 2018-09-26 20:10:31 +0000 |
commit | c6abbfb6d31f673c7238a1d5a504d515031083ae (patch) | |
tree | 48c8c307db82d7a531699475f584426ce5408a44 /core | |
parent | 55245c425223d8db82dea3e6cb1af208fc4cbbfc (diff) | |
download | org.eclipse.cdt-c6abbfb6d31f673c7238a1d5a504d515031083ae.tar.gz org.eclipse.cdt-c6abbfb6d31f673c7238a1d5a504d515031083ae.tar.xz org.eclipse.cdt-c6abbfb6d31f673c7238a1d5a504d515031083ae.zip |
Bug 525705 - Fix Spawner.waitFor(pid) returning prematurely
On Windows XP, waitFor(pid) would return -1 immediately instead of
waiting for the process to exit. This caused starting a debug session to
be stuck at "Initializing debugger services 62%" because the GDB it was
trying to talk to was terminated immediately after being started.
Binaries built with MSVC10 tools and `nmake /f Makefile_x86_64.mk
/NOLOGO spawner`.
Change-Id: I532f63c7a5facdf867ed94945b0cd26b4177c3bd
Signed-off-by: Christian Walther <walther@indel.ch>
Diffstat (limited to 'core')
-rw-r--r-- | core/org.eclipse.cdt.core.win32.x86/os/win32/x86/spawner.dll | bin | 57856 -> 57856 bytes | |||
-rw-r--r-- | core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll | bin | 68608 -> 68608 bytes | |||
-rw-r--r-- | core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c | 6 |
3 files changed, 3 insertions, 3 deletions
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 Binary files differindex 3d36e1ac6df..7192bf286c2 100644 --- 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 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 Binary files differindex 5c30101fa1a..3dba4a71679 100644 --- 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 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; |