Repository: karaf
Updated Branches:
  refs/heads/karaf-2.3.x aa16c0fab -> 483bbfdc6


[KARAF-2878] Reenable the fix on non windows platforms


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/483bbfdc
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/483bbfdc
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/483bbfdc

Branch: refs/heads/karaf-2.3.x
Commit: 483bbfdc6e1cd4ee5e26bd06179ecd549dfea694
Parents: aa16c0f
Author: Guillaume Nodet <[email protected]>
Authored: Thu Sep 4 16:53:25 2014 +0200
Committer: Guillaume Nodet <[email protected]>
Committed: Thu Sep 4 16:53:57 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/karaf/shell/console/jline/Console.java    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/483bbfdc/shell/console/src/main/java/org/apache/karaf/shell/console/jline/Console.java
----------------------------------------------------------------------
diff --git 
a/shell/console/src/main/java/org/apache/karaf/shell/console/jline/Console.java 
b/shell/console/src/main/java/org/apache/karaf/shell/console/jline/Console.java
index d4b68e2..7fbd09f 100644
--- 
a/shell/console/src/main/java/org/apache/karaf/shell/console/jline/Console.java
+++ 
b/shell/console/src/main/java/org/apache/karaf/shell/console/jline/Console.java
@@ -460,11 +460,18 @@ public class Console implements Runnable
     {
         public void run()
         {
+            boolean useAvailable = 
!System.getProperty("os.name").toLowerCase().contains("windows");
             try {
                 while (running)
                 {
                     try
                     {
+                        while (useAvailable && in.available() == 0) {
+                            if (!running) {
+                                return;
+                            }
+                            Thread.sleep(50);
+                        }
                         int c = in.read();
                         if (c == -1)
                         {

Reply via email to