Index: /branches/working-0711/ccl/lisp-kernel/lisp-debug.c
===================================================================
--- /branches/working-0711/ccl/lisp-kernel/lisp-debug.c	(revision 13095)
+++ /branches/working-0711/ccl/lisp-kernel/lisp-debug.c	(revision 13096)
@@ -160,6 +160,8 @@
 readc()
 {
+  unsigned tries = 1000;
   int c;
-  while (1) {
+
+  while (tries) {
     c = getchar();
     switch(c) {
@@ -171,4 +173,6 @@
       if (ferror(stdin)) {
 	if ((errno == EINTR) || (errno == EIO)) {
+	  clearerr(stdin);
+	  tries--;
 	  continue;
 	}
@@ -179,4 +183,5 @@
     }
   }
+  return EOF;
 }
 
