diff options
author | Anton Leherbauer | 2014-05-05 14:35:34 +0000 |
---|---|---|
committer | Anton Leherbauer | 2014-05-05 14:35:34 +0000 |
commit | 62369d66e93997ad036e05296446d48f63bff857 (patch) | |
tree | 5b954b14c78df359081307b8e5aedc899e5d51c2 | |
parent | 06e6284efff1b5ed236deb134fea3269cde3e7b2 (diff) | |
download | org.eclipse.cdt-62369d66e93997ad036e05296446d48f63bff857.tar.gz org.eclipse.cdt-62369d66e93997ad036e05296446d48f63bff857.tar.xz org.eclipse.cdt-62369d66e93997ad036e05296446d48f63bff857.zip |
Bug 434103 - winpty instance might get reused by another PTY
-rw-r--r-- | core/org.eclipse.cdt.core.win32.x86/os/win32/x86/pty.dll | bin | 73216 -> 73728 bytes | |||
-rw-r--r-- | core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll | bin | 89088 -> 89088 bytes | |||
-rw-r--r-- | core/org.eclipse.cdt.core.win32/library/pty/jni/src/pty.cpp | 13 |
3 files changed, 9 insertions, 4 deletions
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 Binary files differindex 65946aaee7a..d814057c3b4 100644 --- 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 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 Binary files differindex e0ad8c13bd3..dc05c116cc1 100644 --- 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 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 */ |