diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-21 13:25:51 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-21 13:25:51 +0200 |
commit | 7b7c6fa589acf72320bf1e20d7928e0b3934bd38 (patch) | |
tree | 07d65984133a58e2479d91dbaf1583271774ab2e /Python/pythonrun.c | |
parent | 881602c8098f748a82beb0c566fa64b42a26b547 (diff) | |
download | cpython-7b7c6fa589acf72320bf1e20d7928e0b3934bd38.tar.gz |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 814220b40e..040172bb3d 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"); + } } |