From 3af3baa457c875345439aad8b1257d3a4c8cd425 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Tue, 25 Nov 2008 19:04:20 +0000 Subject: [PATCH] [249715] [dstore][shells] Unix shell does not echo command --updatd to check for output while checking for input --- .../dstore/universal/miners/command/OutputHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java index efbd69186d8..3987fad6d9d 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java @@ -173,13 +173,13 @@ public class OutputHandler extends Handler { if (!_isStdError && !_isTerminal){ long lastInput = _timeOfLastInput; - while (lastInput == _timeOfLastInput && _keepRunning){ // once there's something new, we can stop waiting + while (lastInput == _timeOfLastInput && _keepRunning && available == 0){ // once there's something new, we can stop waiting Thread.sleep(500); // wait in case there is something + available = checkAvailable(); } - // it's possible that there is no output for something - // in the non-TTY case we need to prompt - available = checkAvailable(); if (available == 0){ + // it's possible that there is no output for something + // in the non-TTY case we need to prompt return new String[0]; } }