Commit 8c419b79 authored by Victor Stinner's avatar Victor Stinner

Issue #11393: Fix the documentation (cancel_dump_traceback_later)

 * dump_traceback_later() => dump_tracebacks_later()
 * cancel_dump_traceback_later() => cancel_dump_tracebacks_later()
parent 795d06d8
...@@ -78,9 +78,9 @@ Dump the tracebacks after a timeout ...@@ -78,9 +78,9 @@ Dump the tracebacks after a timeout
This function is implemented using a watchdog thread, and therefore is This function is implemented using a watchdog thread, and therefore is
not available if Python is compiled with threads disabled. not available if Python is compiled with threads disabled.
.. function:: cancel_dump_traceback_later() .. function:: cancel_dump_tracebacks_later()
Cancel the last call to :func:`dump_traceback_later`. Cancel the last call to :func:`dump_tracebacks_later`.
Dump the traceback on a user signal Dump the traceback on a user signal
...@@ -105,7 +105,7 @@ Dump the traceback on a user signal ...@@ -105,7 +105,7 @@ Dump the traceback on a user signal
File descriptor issue File descriptor issue
--------------------- ---------------------
:func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the :func:`enable`, :func:`dump_tracebacks_later` and :func:`register` keep the
file descriptor of their *file* argument. If the file is closed and its file file descriptor of their *file* argument. If the file is closed and its file
descriptor is reused by a new file, or if :func:`os.dup2` is used to replace descriptor is reused by a new file, or if :func:`os.dup2` is used to replace
the file descriptor, the traceback will be written into a different file. Call the file descriptor, the traceback will be written into a different file. Call
......
...@@ -420,7 +420,7 @@ faulthandler_thread(void *unused) ...@@ -420,7 +420,7 @@ faulthandler_thread(void *unused)
} }
static void static void
faulthandler_cancel_dump_traceback_later(void) faulthandler_cancel_dump_tracebacks_later(void)
{ {
if (thread.running) { if (thread.running) {
/* Notify cancellation */ /* Notify cancellation */
...@@ -465,7 +465,7 @@ faulthandler_dump_traceback_later(PyObject *self, ...@@ -465,7 +465,7 @@ faulthandler_dump_traceback_later(PyObject *self,
return NULL; return NULL;
/* Cancel previous thread, if running */ /* Cancel previous thread, if running */
faulthandler_cancel_dump_traceback_later(); faulthandler_cancel_dump_tracebacks_later();
Py_XDECREF(thread.file); Py_XDECREF(thread.file);
Py_INCREF(file); Py_INCREF(file);
...@@ -493,9 +493,9 @@ faulthandler_dump_traceback_later(PyObject *self, ...@@ -493,9 +493,9 @@ faulthandler_dump_traceback_later(PyObject *self,
} }
static PyObject* static PyObject*
faulthandler_cancel_dump_traceback_later_py(PyObject *self) faulthandler_cancel_dump_tracebacks_later_py(PyObject *self)
{ {
faulthandler_cancel_dump_traceback_later(); faulthandler_cancel_dump_tracebacks_later();
Py_RETURN_NONE; Py_RETURN_NONE;
} }
#endif /* FAULTHANDLER_LATER */ #endif /* FAULTHANDLER_LATER */
...@@ -799,7 +799,7 @@ static PyMethodDef module_methods[] = { ...@@ -799,7 +799,7 @@ static PyMethodDef module_methods[] = {
"dump the traceback of all threads in timeout seconds,\n" "dump the traceback of all threads in timeout seconds,\n"
"or each timeout seconds if repeat is True.")}, "or each timeout seconds if repeat is True.")},
{"cancel_dump_tracebacks_later", {"cancel_dump_tracebacks_later",
(PyCFunction)faulthandler_cancel_dump_traceback_later_py, METH_NOARGS, (PyCFunction)faulthandler_cancel_dump_tracebacks_later_py, METH_NOARGS,
PyDoc_STR("cancel_dump_tracebacks_later():\ncancel the previous call " PyDoc_STR("cancel_dump_tracebacks_later():\ncancel the previous call "
"to dump_tracebacks_later().")}, "to dump_tracebacks_later().")},
#endif #endif
...@@ -939,7 +939,7 @@ void _PyFaulthandler_Fini(void) ...@@ -939,7 +939,7 @@ void _PyFaulthandler_Fini(void)
#ifdef FAULTHANDLER_LATER #ifdef FAULTHANDLER_LATER
/* later */ /* later */
faulthandler_cancel_dump_traceback_later(); faulthandler_cancel_dump_tracebacks_later();
if (thread.cancel_event) { if (thread.cancel_event) {
PyThread_free_lock(thread.cancel_event); PyThread_free_lock(thread.cancel_event);
thread.cancel_event = NULL; thread.cancel_event = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment