[issue11393] Integrate faulthandler module into Python 3.3
STINNER Victor
report at bugs.python.org
Fri Mar 25 17:25:20 CET 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Ok, here is a full patch tested on Linux and Windows:
- Add faulthandler module (code, doc, tests) as a builtin module
- Add "-X faulthandler=1" command line option and PYTHONFAULTHANDLER=1 en var to enable the fault handler at startup
- Add _Py_DumpTraceback() and _Py_DumpTracebackThreads() functions to Python/traceback.c
- Py_FatalError() calls _Py_DumpTraceback() if there is not exception
- Initialize/Unload faulthandler explicitly in Py_InitializeEx()/Py_Finalize() to do it in the right order
I added a section in the doc to explain the file descriptor issue.
I merged different .c and .h files into faulthandler.c, the code is easier to read and maintain like that.
I don't know if the following test is the best test to check if SIGARLM constant and alarm() function are available:
+#ifdef SIGALRM
+# define FAULTHANDLER_LATER
+#endif
(The test works at least on Linux and Windows)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11393>
_______________________________________
More information about the Python-bugs-list
mailing list