(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.
diff --git a/Misc/NEWS b/Misc/NEWS
index 97d6e0d..5953d30 100644
--- 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
index 50802c3..b12d052 100644
--- 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