mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-07 23:54:44 -04:00
Py_RunMain does not call exit()
This commit is contained in:
parent
8fc745c7fb
commit
eb60be9186
@ -263,11 +263,13 @@ run_interpreter() {
|
|||||||
code_page = GetConsoleOutputCP();
|
code_page = GetConsoleOutputCP();
|
||||||
if (code_page != CP_UTF8) SetConsoleOutputCP(CP_UTF8);
|
if (code_page != CP_UTF8) SetConsoleOutputCP(CP_UTF8);
|
||||||
setup_vt_terminal_mode();
|
setup_vt_terminal_mode();
|
||||||
Py_AtExit(cleanup_console_state);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ret = Py_RunMain();
|
int ret = Py_RunMain();
|
||||||
PyConfig_Clear(&config);
|
PyConfig_Clear(&config);
|
||||||
|
#ifdef _WIN32
|
||||||
|
cleanup_console_state();
|
||||||
|
#endif
|
||||||
exit(ret);
|
exit(ret);
|
||||||
#undef CHECK_STATUS
|
#undef CHECK_STATUS
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user