From db7197543112954b0912e3d46e39fefcb1c3b950 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 1 May 2019 05:35:33 +0200 Subject: bpo-36763: Rework _PyInitError API (GH-13031) * Remove _PyInitError.user_err field and _Py_INIT_USER_ERR() macro: use _Py_INIT_ERR() instead. _Py_ExitInitError() now longer calls abort() on error: exit with exit code 1 instead. * Add _PyInitError._type private field. * exitcode field type is now unsigned int on Windows. * Rename prefix field to _func. * Rename msg field to err_msg. --- Python/frozenmain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Python/frozenmain.c') diff --git a/Python/frozenmain.c b/Python/frozenmain.c index 6554aa75b0..a777576ad7 100644 --- a/Python/frozenmain.c +++ b/Python/frozenmain.c @@ -18,9 +18,7 @@ Py_FrozenMain(int argc, char **argv) { _PyInitError err = _PyRuntime_Initialize(); if (_Py_INIT_FAILED(err)) { - fprintf(stderr, "Fatal Python error: %s\n", err.msg); - fflush(stderr); - exit(1); + _Py_ExitInitError(err); } const char *p; -- cgit v1.2.1