Py_RunMain does not call exit()

This commit is contained in:
Kovid Goyal 2019-12-04 20:22:03 +05:30
parent 8fc745c7fb
commit eb60be9186
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -263,11 +263,13 @@ run_interpreter() {
code_page = GetConsoleOutputCP();
if (code_page != CP_UTF8) SetConsoleOutputCP(CP_UTF8);
setup_vt_terminal_mode();
Py_AtExit(cleanup_console_state);
#endif
int ret = Py_RunMain();
PyConfig_Clear(&config);
#ifdef _WIN32
cleanup_console_state();
#endif
exit(ret);
#undef CHECK_STATUS
}