STINNER Victor <victor.stin...@haypocalc.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11393>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to