This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, Trundle, dmalcolm, lemburg, pitrou, scott.dial, vstinner
Date 2011-03-29.22:29:46
SpamBayes Score 4.283348e-10
Marked as misclassified No
Message-id <1301437787.91.0.301978972565.issue11393@psf.upfronthosting.co.za>
In-reply-to
Content
I regenerated the patch.

Last changes:

 - I merged Antoine's new implementation of faulthandler.dump_backtraces_later() using a thread
 - dump_backtraces_later() has a new exit option: if exit=True, call _exit()
 - disable (remove) register() and unregister() on Windows just because these functions are useless. No signal can be used. Only SIGSEGV and SIGBUS can be handled by the process, and these signals cannot be used with register(), only with enable()
 - fix register() and unregister() to be "signal safe": don't move the signal list in memory (because of realloc) or free memory (on unregister) because the signal handler may be running at the same time. Use a static list instead, with a "enabled" flag per signal. The code becomes simpler.
 - fix register(): don't reinstall the signal if it was already installed
 - speed up the test: because dump_backtraces_later() has now a subsecond resolution, we can use sleep of 50 ms instead of 1 sec

It tested the patch on Linux and Windows: it works. Cool, dump_backtraces_later() is now also supported on Windows, thanks to Antoine!

My TODO list is empty (the last item was "fix register() to be signal safe") so I think that the patch is ready to be commited.
History
Date User Action Args
2011-03-29 22:29:47vstinnersetrecipients: + vstinner, lemburg, scott.dial, pitrou, Arfrever, Trundle, dmalcolm
2011-03-29 22:29:47vstinnersetmessageid: <1301437787.91.0.301978972565.issue11393@psf.upfronthosting.co.za>
2011-03-29 22:29:46vstinnerlinkissue11393 messages
2011-03-29 22:29:46vstinnercreate