Skip to content

Commit

Permalink
pythongh-67056: document that registering/unregistering an atexit fun…
Browse files Browse the repository at this point in the history
…c from within an atexit func is undefined (pythonGH-104473)

(cherry picked from commit b15a1a6)

Co-authored-by: Irit Katriel <[email protected]>
  • Loading branch information
iritkatriel authored and miss-islington committed May 15, 2023
1 parent 1afc0a9 commit 6ade9ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Doc/library/atexit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Document that the effect of registering or unregistering an :mod:`atexit`
cleanup function from within a registered cleanup function is undefined.

0 comments on commit 6ade9ea

Please sign in to comment.