summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 22:20:35 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 22:20:35 (GMT)
commitdb932786afdd569bbf2d6b84cfd5cdcb16cb4f27 (patch)
tree4c64bf3202330960ac04ec61ed823fe53a2dddcb
parent725476222a3c1f2f93162d75a540e6bcdeaa36fd (diff)
parent4755ab010f18863e305bbd17bbc16b7f39aed360 (diff)
downloadcpython-db932786afdd569bbf2d6b84cfd5cdcb16cb4f27.zip
cpython-db932786afdd569bbf2d6b84cfd5cdcb16cb4f27.tar.gz
cpython-db932786afdd569bbf2d6b84cfd5cdcb16cb4f27.tar.bz2
Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, clear
the end-of-file indicator after CTRL+d.
-rw-r--r--Misc/NEWS3
-rw-r--r--Parser/myreadline.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 6c942af..4a4767e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 3.2.1?
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
index 50802c3..b12d052 100644
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -73,6 +73,7 @@ my_fgets(char *buf, int len, FILE *fp)
}
#endif /* MS_WINDOWS */
if (feof(fp)) {
+ clearerr(fp);
return -1; /* EOF */
}
#ifdef EINTR