Skip to content

Commit 817190c

Browse files
[3.12] gh-101100: Fix Sphinx warnings in library/faulthandler.rst (GH-118353) (#118366)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 9a91c70 commit 817190c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Doc/library/faulthandler.rst

+9-7
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010

1111
This module contains functions to dump Python tracebacks explicitly, on a fault,
1212
after a timeout, or on a user signal. Call :func:`faulthandler.enable` to
13-
install fault handlers for the :const:`SIGSEGV`, :const:`SIGFPE`,
14-
:const:`SIGABRT`, :const:`SIGBUS`, and :const:`SIGILL` signals. You can also
13+
install fault handlers for the :const:`~signal.SIGSEGV`,
14+
:const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, and
15+
:const:`~signal.SIGILL` signals. You can also
1516
enable them at startup by setting the :envvar:`PYTHONFAULTHANDLER` environment
1617
variable or by using the :option:`-X` ``faulthandler`` command line option.
1718

1819
The fault handler is compatible with system fault handlers like Apport or the
1920
Windows fault handler. The module uses an alternative stack for signal handlers
20-
if the :c:func:`sigaltstack` function is available. This allows it to dump the
21+
if the :c:func:`!sigaltstack` function is available. This allows it to dump the
2122
traceback even on a stack overflow.
2223

2324
The fault handler is called on catastrophic cases and therefore can only use
@@ -70,8 +71,9 @@ Fault handler state
7071

7172
.. function:: enable(file=sys.stderr, all_threads=True)
7273

73-
Enable the fault handler: install handlers for the :const:`SIGSEGV`,
74-
:const:`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS` and :const:`SIGILL`
74+
Enable the fault handler: install handlers for the :const:`~signal.SIGSEGV`,
75+
:const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`
76+
and :const:`~signal.SIGILL`
7577
signals to dump the Python traceback. If *all_threads* is ``True``,
7678
produce tracebacks for every running thread. Otherwise, dump only the current
7779
thread.
@@ -106,8 +108,8 @@ Dumping the tracebacks after a timeout
106108

107109
Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or
108110
every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, call
109-
:c:func:`_exit` with status=1 after dumping the tracebacks. (Note
110-
:c:func:`_exit` exits the process immediately, which means it doesn't do any
111+
:c:func:`!_exit` with status=1 after dumping the tracebacks. (Note
112+
:c:func:`!_exit` exits the process immediately, which means it doesn't do any
111113
cleanup like flushing file buffers.) If the function is called twice, the new
112114
call replaces previous parameters and resets the timeout. The timer has a
113115
sub-second resolution.

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Doc/library/email.errors.rst
3535
Doc/library/email.parser.rst
3636
Doc/library/email.policy.rst
3737
Doc/library/exceptions.rst
38-
Doc/library/faulthandler.rst
3938
Doc/library/functools.rst
4039
Doc/library/getopt.rst
4140
Doc/library/http.cookiejar.rst

0 commit comments

Comments
 (0)