summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorCody Maloney <cmaloney@users.noreply.github.com>2024-07-31 01:39:54 (GMT)
committerGitHub <noreply@github.com>2024-07-31 01:39:54 (GMT)
commita9344cdffa30fdf60154d645f9e74ab3d67ae2e9 (patch)
treeb9aedf3830b49fa93a9dbbfda8635ece486aa717 /Doc/library
parent82db5728136ebec3a1d221570b810b4128a21255 (diff)
downloadcpython-a9344cdffa30fdf60154d645f9e74ab3d67ae2e9.zip
cpython-a9344cdffa30fdf60154d645f9e74ab3d67ae2e9.tar.gz
cpython-a9344cdffa30fdf60154d645f9e74ab3d67ae2e9.tar.bz2
gh-121381 Remove subprocess._USE_VFORK escape hatch (#121383)
This flag was added as an escape hatch in gh-91401 and backported to Python 3.10. The flag broke at some point between its addition and now. As there is currently no publicly known environments that require this, remove it rather than work on fixing it. This leaves the flag in the subprocess module to not break code which may have used / checked the flag itself. discussion: https://discuss.python.org/t/subprocess-use-vfork-escape-hatch-broken-fix-or-remove/56915/2
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/subprocess.rst25
1 files changed, 5 insertions, 20 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index a0ba97f..f10a808 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -1561,36 +1561,22 @@ runtime):
Module which provides function to parse and escape command lines.
-.. _disable_vfork:
.. _disable_posix_spawn:
-Disabling use of ``vfork()`` or ``posix_spawn()``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Disable use of ``posix_spawn()``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On Linux, :mod:`subprocess` defaults to using the ``vfork()`` system call
internally when it is safe to do so rather than ``fork()``. This greatly
improves performance.
-If you ever encounter a presumed highly unusual situation where you need to
-prevent ``vfork()`` from being used by Python, you can set the
-:const:`subprocess._USE_VFORK` attribute to a false value.
-
-::
-
- subprocess._USE_VFORK = False # See CPython issue gh-NNNNNN.
-
-Setting this has no impact on use of ``posix_spawn()`` which could use
-``vfork()`` internally within its libc implementation. There is a similar
-:const:`subprocess._USE_POSIX_SPAWN` attribute if you need to prevent use of
-that.
-
::
subprocess._USE_POSIX_SPAWN = False # See CPython issue gh-NNNNNN.
-It is safe to set these to false on any Python version. They will have no
-effect on older versions when unsupported. Do not assume the attributes are
-available to read. Despite their names, a true value does not indicate that the
+It is safe to set this to false on any Python version. It will have no
+effect on older or newer versions where unsupported. Do not assume the attribute
+is available to read. Despite the name, a true value does not indicate the
corresponding function will be used, only that it may be.
Please file issues any time you have to use these private knobs with a way to
@@ -1598,4 +1584,3 @@ reproduce the issue you were seeing. Link to that issue from a comment in your
code.
.. versionadded:: 3.8 ``_USE_POSIX_SPAWN``
-.. versionadded:: 3.11 ``_USE_VFORK``