[issue16381] Introduce option to force the interpreter to exit upon MemoryErrors

Christian Heimes report at bugs.python.org
Thu Nov 1 16:35:21 CET 2012


Christian Heimes added the comment:

Thanks!

Py_FatalError() might be too drastic for the task. It calls abort() which kills the process with SIGABRT. The function closes and flushes all stream but no additional cleanup code is executed. This might be bad for resources like shared memories, named semaphores or database connections. On Windows abort() causes a pop up window with a crash report, too.

Would exit(3) or _exit(2) work here?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16381>
_______________________________________


More information about the Python-bugs-list mailing list