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 65946aaee7a..d814057c3b4 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_64/os/win32/x86_64/pty.dll b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll index e0ad8c13bd3..dc05c116cc1 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/library/pty/jni/src/pty.cpp b/core/org.eclipse.cdt.core.win32/library/pty/jni/src/pty.cpp index d1b5f42c163..d7d076ed2f3 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,8 +1,9 @@ /******************************************************************************* - * Copyright (c) 2013 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, 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 * * Contributors: * Wind River Systems - initial API and implementation @@ -54,6 +55,10 @@ JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_pty_PTY_openMaster(JNIEnv * srand((unsigned int)time(NULL)); master = rand(); + /* Make sure masterFD does not exist */ + while (fd2pty.find(master) != fd2pty.end()) + master++; + sprintf(line, "winpty_%i", master); /* Remember the winpty handle for the generated masterFD */