summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-05-28 09:35:14 (GMT)
committerGitHub <noreply@github.com>2017-05-28 09:35:14 (GMT)
commitf7ecfac0c15f0c43ef5e6c0081eb3a059af9f074 (patch)
treedc86efb4f9610d3bf9e6338170621bdd1f244f58 /Doc
parenteca7da0f13c78013b924fe7306f3e2e59c0af40b (diff)
downloadcpython-f7ecfac0c15f0c43ef5e6c0081eb3a059af9f074.zip
cpython-f7ecfac0c15f0c43ef5e6c0081eb3a059af9f074.tar.gz
cpython-f7ecfac0c15f0c43ef5e6c0081eb3a059af9f074.tar.bz2
Doc nits for bpo-16500 (#1841)
* Doc nits for bpo-16500 * Fix more references
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/init.rst8
-rw-r--r--Doc/whatsnew/3.7.rst9
2 files changed, 13 insertions, 4 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index ca7636b..c12e1c7 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -564,7 +564,7 @@ Additionally, when extending or embedding Python, calling :c:func:`fork`
directly rather than through :func:`os.fork` (and returning to or calling
into Python) may result in a deadlock by one of Python's internal locks
being held by a thread that is defunct after the fork.
-:c:func:`PyOS_AfterFork` tries to reset the necessary locks, but is not
+:c:func:`PyOS_AfterFork_Child` tries to reset the necessary locks, but is not
always able to.
@@ -675,9 +675,9 @@ code, or when embedding the Python interpreter:
.. c:function:: void PyEval_ReInitThreads()
- This function is called from :c:func:`PyOS_AfterFork` to ensure that newly
- created child processes don't hold locks referring to threads which
- are not running in the child process.
+ This function is called from :c:func:`PyOS_AfterFork_Child` to ensure
+ that newly created child processes don't hold locks referring to threads
+ which are not running in the child process.
The following functions use thread-local storage, and are not compatible
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 3195d90..761c85f 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -166,6 +166,10 @@ Serhiy Storchaka in :issue:`28682`.)
Added support for :ref:`file descriptors <path_fd>` in :func:`~os.scandir`
on Unix. (Contributed by Serhiy Storchaka in :issue:`25996`.)
+New function :func:`os.register_at_fork` allows registering Python callbacks
+to be executed on a process fork. (Contributed by Antoine Pitrou in
+:issue:`16500`.)
+
unittest.mock
-------------
@@ -243,6 +247,11 @@ Build and C API Changes
* Added functions :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`.
(Contributed by Serhiy Storchaka in :issue:`27867`.)
+* :c:func:`PyOS_AfterFork` is deprecated in favour of the new functions
+ :c:func:`PyOS_BeforeFork`, :c:func:`PyOS_AfterFork_Parent` and
+ :c:func:`PyOS_AfterFork_Child`. (Contributed by Antoine Pitrou in
+ :issue:`16500`.)
+
Deprecated
==========