Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Corbat2015-10-07 13:22:44 +0000
committerThomas Corbat2016-01-21 09:48:32 +0000
commit7b6cbde517a6bbd90f7abccef464f0a55d63ceef (patch)
tree1bd033a831276fc1caf90f0bf6c6dc0205e7ec10 /core/org.eclipse.cdt.core.native/src/org
parent12931d59a7f1cbd00007e0da826c8f451ffadd1f (diff)
downloadorg.eclipse.cdt-7b6cbde517a6bbd90f7abccef464f0a55d63ceef.tar.gz
org.eclipse.cdt-7b6cbde517a6bbd90f7abccef464f0a55d63ceef.tar.xz
org.eclipse.cdt-7b6cbde517a6bbd90f7abccef464f0a55d63ceef.zip
Bug 479241 - [PTY] Output gets cut off after EOF on input
Conflicts: core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java Change-Id: If13b0d977f621e21e7fe89b2b52f07f74858787c Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
Diffstat (limited to 'core/org.eclipse.cdt.core.native/src/org')
-rw-r--r--core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java
index f5335c18375..c30f08de802 100644
--- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java
+++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java
@@ -15,6 +15,7 @@ import java.io.IOException;
import java.io.OutputStream;
import org.eclipse.cdt.utils.pty.PTY.MasterFD;
+import org.eclipse.core.runtime.Platform;
public class PTYOutputStream extends OutputStream {
@@ -84,13 +85,15 @@ public class PTYOutputStream extends OutputStream {
public void close() throws IOException {
if (master.getFD() == -1)
return;
- if (sendEotBeforeClose) {
+ // For non-windows platforms, send EOT instead of closing
+ if (Platform.OS_WIN32.equals(Platform.getOS())) {
+ int status = close0(master.getFD());
+ if (status == -1)
+ throw new IOException("close error"); //$NON-NLS-1$
+ master.setFD(-1);
+ } else {
write(EOT);
}
- int status = close0(master.getFD());
- if (status == -1)
- throw new IOException("close error"); //$NON-NLS-1$
- master.setFD(-1);
}
@Override

Back to the top