[Python-checkins] cpython (merge 3.2 -> default): (Merge 3.2) Issue #1195: Fix input() if it is interrupted by CTRL+d and then

victor.stinner python-checkins at python.org
Tue May 10 00:21:53 CEST 2011


http://hg.python.org/cpython/rev/3ff5d28ab630
changeset:   69995:3ff5d28ab630
parent:      69992:2d4ef202d4ed
parent:      69994:b5914bfb4d04
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Tue May 10 00:21:26 2011 +0200
summary:
  (Merge 3.2) Issue #1195: Fix input() if it is interrupted by CTRL+d and then
CTRL+c, clear the end-of-file indicator after CTRL+d.

files:
  Misc/NEWS           |  3 +++
  Parser/myreadline.c |  1 +
  2 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
 Core and Builtins
 -----------------
 
+- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,
+  clear the end-of-file indicator after CTRL+d.
+
 - Issue #1856: Avoid crashes and lockups when daemon threads run while the
   interpreter is shutting down; instead, these threads are now killed when
   they try to take the GIL.
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -73,6 +73,7 @@
         }
 #endif /* MS_WINDOWS */
         if (feof(fp)) {
+            clearerr(fp);
             return -1; /* EOF */
         }
 #ifdef EINTR

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list