Accidentally applied this patch, so reverting it now.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@719729 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java b/shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java
index 63014d5..9848d05 100644
--- a/shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java
+++ b/shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java
@@ -110,14 +110,17 @@
         if (m_runnable != null)
         {
             m_runnable.stop();
+            m_thread.interrupt();
         }
     }
 
     private class ShellTuiRunnable implements Runnable
     {
+        private volatile boolean stop = false;
+
         public void stop()
         {
-            m_thread.interrupt();
+            stop = true;
         }
 
         public void run()
@@ -125,24 +128,14 @@
             String line = null;
             BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
 
-            while (true)
+            while (!stop)
             {
                 System.out.print("-> ");
 
                 try
                 {
-                    while (System.in.available() == 0)
-                    {
-                        Thread.sleep(100);
-                    }
-
                     line = in.readLine();
                 }
-                catch (InterruptedException ex)
-                {
-                    // Silently exit, since this signifies that the bundle was stopped.
-                    break;
-                }
                 catch (IOException ex)
                 {
                     System.err.println("ShellTUI: Error reading from stdin...exiting.");