[Python-checkins] cpython (3.1): Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,

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


http://hg.python.org/cpython/rev/fa3227c3cf87
changeset: 69993:fa3227c3cf87
branch: 3.1
parent: 69983:4a3d5198a408
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue May 10 00:19:53 2011 +0200
summary:
 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 #9756: When calling a method descriptor or a slot wrapper descriptor,
 the check of the object type doesn't read the __class__ attribute anymore.
 Fix a crash if a class override its __class__ attribute (e.g. a proxy of the
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

AltStyle によって変換されたページ (->オリジナル) /