bpo-36763: _Py_RunMain() doesn't call Py_Exit() anymore (GH-13390)

Py_Main() and _Py_RunMain() now return the exitcode rather than
calling Py_Exit(exitcode) when calling PyErr_Print() if the current
exception type is SystemExit.

* Add _Py_HandleSystemExit().
* Add pymain_exit_err_print().
* Add pymain_exit_print().
This commit is contained in:
Victor Stinner 2019-05-17 23:05:29 +02:00 committed by GitHub
parent bcfbbd7046
commit 12083284c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 117 additions and 63 deletions

View file

@ -0,0 +1,3 @@
``Py_Main()`` now returns the exitcode rather than calling
``Py_Exit(exitcode)`` when calling ``PyErr_Print()`` if the current
exception type is ``SystemExit``.