summaryrefslogtreecommitdiff
path: root/Doc/library/faulthandler.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/faulthandler.rst')
-rw-r--r--Doc/library/faulthandler.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/Doc/library/faulthandler.rst b/Doc/library/faulthandler.rst
index eb2016a7b9..3a5badd0ff 100644
--- a/Doc/library/faulthandler.rst
+++ b/Doc/library/faulthandler.rst
@@ -47,6 +47,9 @@ Dumping the traceback
Dump the tracebacks of all threads into *file*. If *all_threads* is
``False``, dump only the current thread.
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
Fault handler state
-------------------
@@ -59,6 +62,12 @@ Fault handler state
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
+ :ref:`issue with file descriptors <faulthandler-fd>`.
+
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
.. function:: disable()
Disable the fault handler: uninstall the signal handlers installed by
@@ -82,9 +91,16 @@ Dumping the tracebacks after a timeout
call replaces previous parameters and resets the timeout. The timer has a
sub-second resolution.
+ The *file* must be kept open until the traceback is dumped or
+ :func:`cancel_dump_traceback_later` is called: see :ref:`issue with file
+ descriptors <faulthandler-fd>`.
+
This function is implemented using a watchdog thread and therefore is not
available if Python is compiled with threads disabled.
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
.. function:: cancel_dump_traceback_later()
Cancel the last call to :func:`dump_traceback_later`.
@@ -99,8 +115,14 @@ Dumping the traceback on a user signal
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
+ :func:`unregister`: see :ref:`issue with file descriptors <faulthandler-fd>`.
+
Not available on Windows.
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
.. function:: unregister(signum)
Unregister a user signal: uninstall the handler of the *signum* signal
@@ -110,6 +132,8 @@ Dumping the traceback on a user signal
Not available on Windows.
+.. _faulthandler-fd:
+
Issue with file descriptors
---------------------------