[Python-checkins] cpython (3.3): Issue #17619: Make input() check for Ctrl-C correctly on Windows.

richard.oudkerk python-checkins at python.org
Wed Apr 3 14:51:02 CEST 2013


http://hg.python.org/cpython/rev/241cd716bf5f
changeset:   83080:241cd716bf5f
branch:      3.3
parent:      83078:a38dd5df235c
user:        Richard Oudkerk <shibturn at gmail.com>
date:        Wed Apr 03 13:44:50 2013 +0100
summary:
  Issue #17619: Make input() check for Ctrl-C correctly on Windows.

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


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@
 Core and Builtins
 -----------------
 
+- Issue #17619: Make input() check for Ctrl-C correctly on Windows.
+
 - Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
 
 - Issue #17357: Add missing verbosity output when using -v/-vv.
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1733,6 +1733,7 @@
         }
         s = PyOS_Readline(stdin, stdout, prompt);
         if (s == NULL) {
+            PyErr_CheckSignals();
             if (!PyErr_Occurred())
                 PyErr_SetNone(PyExc_KeyboardInterrupt);
             goto _readline_errors;

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


More information about the Python-checkins mailing list