Skip to content

Conversation

@cmaloney
Copy link
Contributor

@cmaloneycmaloney 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
@cmaloneycmaloney changed the title Remove subprocess._USE_VFORK escape hatchgh-121381 Remove subprocess._USE_VFORK escape hatchJul 4, 2024
@cmaloneycmaloneyforce-pushed the cmaloney/rm_use_vfork branch from 8dba0d8 to d19dd0cCompareJuly 4, 2024 21:51
Copy link
Member

@vstinnervstinner 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

@vstinnervstinner 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.

@vstinnervstinner added the topic-subprocess Subprocess issues. label Jul 8, 2024
@hauntsaninjahauntsaninja merged commit a9344cd into python:mainJul 31, 2024
@hauntsaninja
Copy link
Contributor

Thank you!

@cmaloneycmaloney 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-subprocessSubprocess issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@cmaloney@hauntsaninja@vstinner