diff options
author | Thomas Watson | 2005-01-17 23:34:40 +0000 |
---|---|---|
committer | Thomas Watson | 2005-01-17 23:34:40 +0000 |
commit | 897745c9cd1a8069d0f66d615470a09a30d4ca03 (patch) | |
tree | 7e9273f113cfe6a51e6f2a9a3b92882ec3f1c79b /bundles/org.eclipse.osgi/console | |
parent | 173a6b713d545b57ea20129786e073afe0800cb7 (diff) | |
download | rt.equinox.framework-897745c9cd1a8069d0f66d615470a09a30d4ca03.tar.gz rt.equinox.framework-897745c9cd1a8069d0f66d615470a09a30d4ca03.tar.xz rt.equinox.framework-897745c9cd1a8069d0f66d615470a09a30d4ca03.zip |
Fix to console not working, removed bogus blocking lock.
Diffstat (limited to 'bundles/org.eclipse.osgi/console')
-rw-r--r-- | bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java b/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java index 31c7395af..5567014d2 100644 --- a/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java +++ b/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java @@ -245,36 +245,17 @@ public class FrameworkConsole implements Runnable { * @throws IOException */ protected void console() throws IOException { - Object lock = new Object(); disconnect = false; // wait to receive commands from console and handle them BufferedReader br = (BufferedReader) in; //cache the console prompt String String consolePrompt = "\r\n" + ConsoleMsg.formatter.getString("CONSOLE_PROMPT"); //$NON-NLS-1$ //$NON-NLS-2$ - boolean block = !("arm".equals(System.getProperty("osgi.arch"))); //$NON-NLS-1$ //$NON-NLS-2$ while (!disconnect) { out.print(consolePrompt); out.flush(); - - String cmdline = null; - if (block) { - // avoid waiting on input stream - apparently generates contention with other native calls - try { - synchronized (lock) { - while (!br.ready()) - lock.wait(300); - } - cmdline = br.readLine(); - } catch (InterruptedException e) { - // do nothing; probably got disconnected - } - } else - cmdline = br.readLine(); - - if (cmdline == null) { + String cmdline = br.readLine(); + if (cmdline == null) break; - } - docommand(cmdline); } } |