[Python-checkins] cpython (merge 3.1 -> 3.2): Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, clear
victor.stinner
python-checkins at python.org
Tue May 10 00:21:52 CEST 2011
http://hg.python.org/cpython/rev/b5914bfb4d04
changeset: 69994:b5914bfb4d04
branch: 3.2
parent: 69987:62e2b74c3bfc
parent: 69993:fa3227c3cf87
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue May 10 00:20:35 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 #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