faulthandler.enable(file=sys.stderr, all_threads=True)
Enable the fault handler: install handlers for the SIGSEGV
, SIGFPE
, SIGABRT
, SIGBUS
and SIGILL
signals to dump the Python traceback. If all_threads is True
, produce tracebacks for every running thread. Otherwise, dump only the current thread.
The file must be kept open until the fault handler is disabled: see issue with file descriptors.
Changed in version 3.5: Added support for passing file descriptor to this function.
Please login to continue.