karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject git commit: [KARAF-2878] Reenable the fix on non windows platforms
Date Thu, 04 Sep 2014 14:57:23 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x f3e49ca95 -> 6c6a0a80a


[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/6c6a0a80
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/6c6a0a80
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/6c6a0a80

Branch: refs/heads/karaf-3.0.x
Commit: 6c6a0a80a73f6a33f5f2ff83e378f49f85046469
Parents: f3e49ca
Author: Guillaume Nodet <gnodet@gmail.com>
Authored: Thu Sep 4 16:53:25 2014 +0200
Committer: Guillaume Nodet <gnodet@gmail.com>
Committed: Thu Sep 4 16:57:09 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/karaf/blob/6c6a0a80/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
index 7404465..4ce7194 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
@@ -483,9 +483,16 @@ public class ConsoleImpl implements Console {
 
     private class Pipe 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) {
                             return;


Mime
View raw message