[Python-checkins] cpython: Issue #18520: Fix initsigs(), handle PyOS_InitInterrupts() error

victor.stinner python-checkins at python.org
Sun Jul 21 13:26:06 CEST 2013


http://hg.python.org/cpython/rev/276477d5a548
changeset:   84761:276477d5a548
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Sun Jul 21 13:25:51 2013 +0200
summary:
  Issue #18520: Fix initsigs(), handle PyOS_InitInterrupts() error

PyOS_InitInterrupts() can raise error when importing the signal module

files:
  Python/pythonrun.c |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Python/pythonrun.c b/Python/pythonrun.c
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -2481,6 +2481,9 @@
     PyOS_setsig(SIGXFSZ, SIG_IGN);
 #endif
     PyOS_InitInterrupts(); /* May imply initsignal() */
+    if (PyErr_Occurred()) {
+        Py_FatalError("Py_Initialize: can't import signal");
+    }
 }
 
 

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


More information about the Python-checkins mailing list