diff --git a/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/pty.dll b/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/pty.dll index d814057c3b4..60d5b377614 100644 Binary files a/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/pty.dll and b/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/pty.dll differ diff --git a/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/winpty-agent.exe b/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/winpty-agent.exe index a2b6289a116..2a0cfe5b3f7 100644 Binary files a/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/winpty-agent.exe and b/core/org.eclipse.cdt.core.win32.x86/os/win32/x86/winpty-agent.exe differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll index dc05c116cc1..221ac7deab5 100644 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/winpty-agent.exe b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/winpty-agent.exe index a2b6289a116..75b49a1a402 100644 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/winpty-agent.exe and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/winpty-agent.exe differ diff --git a/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF index 361c7939742..71a80c55985 100644 --- a/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.win32 Bundle-SymbolicName: org.eclipse.cdt.core.win32; singleton:=true -Bundle-Version: 5.4.0.qualifier +Bundle-Version: 5.4.1.qualifier Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core.native;bundle-version="[5.7.0,6.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.win32/library/pty/jni/src/pty.cpp b/core/org.eclipse.cdt.core.win32/library/pty/jni/src/pty.cpp index d7d076ed2f3..a9865b0ad29 100644 --- a/core/org.eclipse.cdt.core.win32/library/pty/jni/src/pty.cpp +++ b/core/org.eclipse.cdt.core.win32/library/pty/jni/src/pty.cpp @@ -1,9 +1,9 @@ /******************************************************************************* - * Copyright (c) 2013, 2014 Wind River Systems, Inc. and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2013, 2016 Wind River Systems, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Wind River Systems - initial API and implementation @@ -145,7 +145,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYInputStream_read0 if (!ret || amount == 0) amount = -1; - if (!ret) { + if (!ret && fd2pty.find(fd) != fd2pty.end()) { int rc = winpty_get_exit_code(winpty); fd2rc.insert(std::pair(fd, rc)); } @@ -173,11 +173,11 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYInputStream_close0(JNIE fd2pty_Iter = fd2pty.find(fd); if (fd2pty_Iter != fd2pty.end()) { winpty_t* winpty = fd2pty_Iter -> second; + fd2pty.erase(fd2pty_Iter); if (winpty != NULL) { winpty_close(winpty); winpty = NULL; } - fd2pty.erase(fd2pty_Iter); } return 0; @@ -241,11 +241,11 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTYOutputStream_close0(JNI fd2pty_Iter = fd2pty.find(fd); if (fd2pty_Iter != fd2pty.end()) { winpty_t* winpty = fd2pty_Iter -> second; + fd2pty.erase(fd2pty_Iter); if (winpty != NULL) { winpty_close(winpty); winpty = NULL; } - fd2pty.erase(fd2pty_Iter); } return 0; diff --git a/core/org.eclipse.cdt.core.win32/pom.xml b/core/org.eclipse.cdt.core.win32/pom.xml index b2c6e51784f..69a6499f1f7 100644 --- a/core/org.eclipse.cdt.core.win32/pom.xml +++ b/core/org.eclipse.cdt.core.win32/pom.xml @@ -11,7 +11,7 @@ ../../pom.xml - 5.4.0-SNAPSHOT + 5.4.1-SNAPSHOT org.eclipse.cdt.core.win32 eclipse-plugin