Back to module index
Go to module by name
faulthandler
faulthandler module.
Functions
cancel_dump_traceback_later
cancel_dump_traceback_later(...)
cancel_dump_traceback_later():
cancel the previous call to dump_traceback_later().
disable
disable(...)
disable(): disable the fault handler
dump_traceback
dump_traceback(...)
dump_traceback(file=sys.stderr, all_threads=True): dump the traceback of the current thread, or of all threads if all_threads is True, into file
dump_traceback_later
dump_traceback_later(...)
dump_traceback_later(timeout, repeat=False, file=sys.stderrn, exit=False):
dump the traceback of all threads in timeout seconds,
or each timeout seconds if repeat is True. If exit is True, call _exit(1) which is not safe.
enable
enable(...)
enable(file=sys.stderr, all_threads=True): enable the fault handler
is_enabled
is_enabled(...)
is_enabled()->bool: check if the handler is enabled
register
register(...)
register(signum, file=sys.stderr, all_threads=True, chain=False): register a handler for the signal 'signum': dump the traceback of the current thread, or of all threads if all_threads is True, into file
unregister
unregister(...)
unregister(signum): unregister the handler of the signal 'signum' registered by register()