]> granicus.if.org Git - python/commit
Re-init _Py_UnhandledKeyboardInterrupt before run. (GH-11963)
authorGregory P. Smith <greg@krypto.org>
Thu, 21 Feb 2019 01:35:54 +0000 (17:35 -0800)
committerGitHub <noreply@github.com>
Thu, 21 Feb 2019 01:35:54 +0000 (17:35 -0800)
commitd9bc543cbb9681f77d94864d05e2ba2d353e6de9
treea24965055c43fe8a9fa152d30b07452e5c986820
parent9b0c681e2d7e708a07e34d9c08e4424bdd4f5ebc
Re-init _Py_UnhandledKeyboardInterrupt before run. (GH-11963)

Explicitly reinitialize this every eval *just in case* someone is
calling into an embedded Python where they don't care about an uncaught
KeyboardInterrupt exception (why didn't they leave
`config.install_signal_handlers` set to `0`?!?) but then later call
`Py_Main()` itself (which *checks* this flag and dies with a signal after
its interpreter exits).  We don't want a previous embedded interpreter's
uncaught exception to trigger an unexplained signal exit from a future
`Py_Main()` based one.
Python/pythonrun.c