summaryrefslogtreecommitdiffstats
path: root/Doc/library/atexit.rst
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-05-15 08:12:52 (GMT)
committerGitHub <noreply@github.com>2023-05-15 08:12:52 (GMT)
commitb15a1a6ac6ea0d7792036e639e90f0e51400c2ee (patch)
tree7eab63c2a3540255cb21746ec6896a29ace3d57e /Doc/library/atexit.rst
parent146106a0f1cc61815fa33f0d3f808a3e3e3275be (diff)
downloadcpython-b15a1a6ac6ea0d7792036e639e90f0e51400c2ee.zip
cpython-b15a1a6ac6ea0d7792036e639e90f0e51400c2ee.tar.gz
cpython-b15a1a6ac6ea0d7792036e639e90f0e51400c2ee.tar.bz2
gh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (#104473)
Diffstat (limited to 'Doc/library/atexit.rst')
-rw-r--r--Doc/library/atexit.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst
index f7f0381..a2bd85b 100644
--- a/Doc/library/atexit.rst
+++ b/Doc/library/atexit.rst
@@ -20,6 +20,9 @@ at interpreter termination time they will be run in the order ``C``, ``B``,
program is killed by a signal not handled by Python, when a Python fatal
internal error is detected, or when :func:`os._exit` is called.
+**Note:** The effect of registering or unregistering functions from within
+a cleanup function is undefined.
+
.. versionchanged:: 3.7
When used with C-API subinterpreters, registered functions
are local to the interpreter they were registered in.