Add the ability to catch and do the right thing with Interrupts (often control-c)
and end-of-file (often control-d).

llvm-svn: 119837
diff --git a/lldb/tools/driver/IOChannel.cpp b/lldb/tools/driver/IOChannel.cpp
index 004e1da..bf7891a 100644
--- a/lldb/tools/driver/IOChannel.cpp
+++ b/lldb/tools/driver/IOChannel.cpp
@@ -448,12 +448,12 @@
     if (! IsGettingCommand())
         return;
 
-    // Compare the current time versus the last time el_gets was called.  If less than
-    // 10000 microseconds (10000000 nanoseconds) have elapsed, wait 10000 microseconds, to ensure el_gets had time
-    // to finish writing the prompt before we start writing here.
+    // Compare the current time versus the last time el_gets was called.  If less than 40 milliseconds
+    // (40,0000 microseconds or 40,000,0000 nanoseconds) have elapsed, wait 40,0000 microseconds, to ensure el_gets had
+    // time to finish writing the prompt before we start writing here.
 
-    if (ElapsedNanoSecondsSinceEnteringElGets() < 10000000)
-        usleep (10000);
+    if (ElapsedNanoSecondsSinceEnteringElGets() < (40 * 1000 * 1000))
+        usleep (40 * 1000);
 
     // Use the mutex to make sure OutWrite, ErrWrite and Refresh prompt do not interfere with
     // each other's output.