summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-21 11:25:51 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-07-21 11:25:51 (GMT)
commitd786ad55ef7318d573cec7c57abe4f6d6c3a0439 (patch)
treebf0b2aca6ae45327fc810e3f8651f085d9669f03 /Python/pythonrun.c
parent41801f581202ab8fab149465d10568003c9a8aad (diff)
downloadcpython-d786ad55ef7318d573cec7c57abe4f6d6c3a0439.zip
cpython-d786ad55ef7318d573cec7c57abe4f6d6c3a0439.tar.gz
cpython-d786ad55ef7318d573cec7c57abe4f6d6c3a0439.tar.bz2
Issue #18520: Fix initsigs(), handle PyOS_InitInterrupts() error
PyOS_InitInterrupts() can raise error when importing the signal module
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 814220b..040172b 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -2481,6 +2481,9 @@ initsigs(void)
PyOS_setsig(SIGXFSZ, SIG_IGN);
#endif
PyOS_InitInterrupts(); /* May imply initsignal() */
+ if (PyErr_Occurred()) {
+ Py_FatalError("Py_Initialize: can't import signal");
+ }
}