Skip to content

gh-121381 Remove subprocess._USE_VFORK escape hatch #121383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 31, 2024

Conversation

cmaloney
Copy link
Contributor

@cmaloney cmaloney commented Jul 4, 2024

This flag was added as an escape hatch in bpo-47245 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.

discussion: https://discuss.python.org/t/subprocess-use-vfork-escape-hatch-broken-fix-or-remove/56915/2


📚 Documentation preview 📚: https://cpython-previews--121383.org.readthedocs.build/

This flag was added as an escape hatch in pythongh-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
@cmaloney cmaloney changed the title Remove subprocess._USE_VFORK escape hatch gh-121381 Remove subprocess._USE_VFORK escape hatch Jul 4, 2024
@cmaloney cmaloney force-pushed the cmaloney/rm_use_vfork branch from 8dba0d8 to d19dd0c Compare July 4, 2024 21:51
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gpshead: What do you think? Should we get rid of this feature, or fix it?

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The glibc posix_spawn() can use vfork() automatically and there is no option to control it. I don't think that Python users have to decide if vfork() is used or not. At least, I don't know any good reason to disable vfork() in subprocess.

@vstinner vstinner added the topic-subprocess Subprocess issues. label Jul 8, 2024
@hauntsaninja hauntsaninja merged commit a9344cd into python:main Jul 31, 2024
39 checks passed
@hauntsaninja
Copy link
Contributor

Thank you!

@cmaloney cmaloney deleted the cmaloney/rm_use_vfork branch July 31, 2024 02:06
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
)

This flag was added as an escape hatch in pythongh-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-subprocess Subprocess issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants