Message132110
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) |
|
Date |
User |
Action |
Args |
2011-03-25 16:25:21 | vstinner | set | recipients:
+ vstinner, lemburg, scott.dial, pitrou, Arfrever, Trundle, dmalcolm |
2011-03-25 16:25:20 | vstinner | set | messageid: <1301070320.99.0.607666182323.issue11393@psf.upfronthosting.co.za> |
2011-03-25 16:25:20 | vstinner | link | issue11393 messages |
2011-03-25 16:25:20 | vstinner | create | |
|