diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java index 84fd4148ca4..077a109690d 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java @@ -613,10 +613,6 @@ public class CommandMinerThread extends MinerThread writer.write(input); writer.newLine(); writer.flush(); - - // for bug 249715 - keeping track of time of last input - // in order know when to stop waiting for output - _stdOutputHandler.setTimeOfLastInput(System.currentTimeMillis()); if (!_isWindows && (input.startsWith("cd ") || input.equals("cd"))) //$NON-NLS-1$ //$NON-NLS-2$ { @@ -628,24 +624,10 @@ public class CommandMinerThread extends MinerThread } if (!_isWindows && !_isTTY) { - // special case for pattern interpretting - // if cwd is not set, then files aren't resolved - // create mock prompt to ensure that they do get resolved - if (input.startsWith("cd ") || input.equals("cd")) //$NON-NLS-1$ //$NON-NLS-2$ - { - writer.write("echo $PWD'>'"); //$NON-NLS-1$ - writer.newLine(); - writer.flush(); - - // sleep to allow reader to interpret before going on - try - { - Thread.sleep(100); - } - catch (InterruptedException e) - { - } - } + // always prompt after the command + writer.write("echo $PWD'>'"); //$NON-NLS-1$ + writer.newLine(); + writer.flush(); } } catch (IOException e) 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 3987fad6d9d..d8c8395e66d 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 @@ -54,9 +54,7 @@ public class OutputHandler extends Handler { private boolean _endOfStream = false; private List _encodings; - - // for bug 249715 - private long _timeOfLastInput = 0; + public OutputHandler(DataInputStream reader, String qualifier, boolean isTerminal, boolean isStdError, boolean isShell, @@ -87,9 +85,6 @@ public class OutputHandler extends Handler { } - public void setTimeOfLastInput(long time){ - _timeOfLastInput = time; - } public void handle() { @@ -169,27 +164,12 @@ public class OutputHandler extends Handler { int lookahead = 0; // re-determine available if none available now - if (available == 0) { - - if (!_isStdError && !_isTerminal){ - long lastInput = _timeOfLastInput; - 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(); - } - 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]; - } - } - else { - lookahead = _reader.read(); - if (lookahead == -1) { - return null; - } else { - available = _reader.available() + 1; - } + if (available == 0) { + lookahead = _reader.read(); + if (lookahead == -1) { + return null; + } else { + available = _reader.available() + 1; } }