Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2018-10-19 12:09:28 -0400
committerAndrey Loskutov2018-10-19 12:09:28 -0400
commit32924160077894cb14dc55ebbc8eb2b0c0156ae6 (patch)
tree3adf5ace7f058f192ff6b57a08f13c96d95c5ce7
parentd8657b2563bda1f90eaf30ef36df09681eb1d39b (diff)
downloadeclipse.platform.debug-32924160077894cb14dc55ebbc8eb2b0c0156ae6.tar.gz
eclipse.platform.debug-32924160077894cb14dc55ebbc8eb2b0c0156ae6.tar.xz
eclipse.platform.debug-32924160077894cb14dc55ebbc8eb2b0c0156ae6.zip
is zero This avioids endless while loop in ProcessConsole.InputReadJob.run(IProgressMonitor) Change-Id: Ied3dc78a2f1b9671e64193a18ead17c9f9f57f08 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java
index 0791aa560..08aca974c 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java
@@ -269,6 +269,11 @@ public class IOConsoleInputStream extends InputStream {
public int available() throws IOException {
if (closed && eofSent) {
throw new IOException("Input Stream Closed"); //$NON-NLS-1$
+ } else if (size == 0) {
+ if (!eofSent) {
+ eofSent = true;
+ return -1;
+ }
}
return size;
}

Back to the top