This function is implemented using a watchdog thread, and therefore is
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
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
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
}
static void
-faulthandler_cancel_dump_traceback_later(void)
+faulthandler_cancel_dump_tracebacks_later(void)
{
if (thread.running) {
/* Notify cancellation */
return NULL;
/* Cancel previous thread, if running */
- faulthandler_cancel_dump_traceback_later();
+ faulthandler_cancel_dump_tracebacks_later();
Py_XDECREF(thread.file);
Py_INCREF(file);
}
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;
}
#endif /* FAULTHANDLER_LATER */
"dump the traceback of all threads in timeout seconds,\n"
"or each timeout seconds if repeat is True.")},
{"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 "
"to dump_tracebacks_later().")},
#endif
#ifdef FAULTHANDLER_LATER
/* later */
- faulthandler_cancel_dump_traceback_later();
+ faulthandler_cancel_dump_tracebacks_later();
if (thread.cancel_event) {
PyThread_free_lock(thread.cancel_event);
thread.cancel_event = NULL;