Skip to content

Commit b15a1a6

Browse files
authored
pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473)
1 parent 146106a commit b15a1a6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Doc/library/atexit.rst

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ at interpreter termination time they will be run in the order ``C``, ``B``,
2020
program is killed by a signal not handled by Python, when a Python fatal
2121
internal error is detected, or when :func:`os._exit` is called.
2222

23+
**Note:** The effect of registering or unregistering functions from within
24+
a cleanup function is undefined.
25+
2326
.. versionchanged:: 3.7
2427
When used with C-API subinterpreters, registered functions
2528
are local to the interpreter they were registered in.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Document that the effect of registering or unregistering an :mod:`atexit`
2+
cleanup function from within a registered cleanup function is undefined.

0 commit comments

Comments
 (0)