faulthandler.register()

faulthandler.register(signum, file=sys.stderr, all_threads=True, chain=False)

Register a user signal: install a handler for the signum signal to dump the traceback of all threads, or of the current thread if all_threads is False, into file. Call the previous handler if chain is True.

The file must be kept open until the signal is unregistered by unregister(): see issue with file descriptors.

Not available on Windows.

Changed in version 3.5: Added support for passing file descriptor to this function.

doc_python
2016-10-07 17:33:05
Comments
Leave a Comment

Please login to continue.