Skip to content

subprocess._USE_VFORK doesn't change usage of vfork #121381

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

Closed
cmaloney opened this issue Jul 4, 2024 · 1 comment
Closed

subprocess._USE_VFORK doesn't change usage of vfork #121381

cmaloney opened this issue Jul 4, 2024 · 1 comment
Labels
type-bug An unexpected behavior, bug, or error

Comments

@cmaloney
Copy link
Contributor

cmaloney commented Jul 4, 2024

Bug report

Bug description:

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

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, planning to remove it rather than work on fixing it.

I found that the test for this was broken while working on tests for reducing system calls in other cases (GH-120754). The strace based test isn't currently being run by any CI bots. Have a PR which both adds tests around read and fixes the strace tests to run on some of the bots: #121143

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

@cmaloney cmaloney added the type-bug An unexpected behavior, bug, or error label Jul 4, 2024
@hauntsaninja
Copy link
Contributor

Sanity checking the results of https://grep.app/search?q=_USE_VFORK&case=true&filter[lang][0]=Python and https://github.com/search?q=_USE_VFORK+language%3APython+&type=code , I think it would be fine to remove. It's clearly a private API. The billiard code would break a little unfortunately, but they're reading it unchecked despite the documentation explicitly saying not to do so, they're using internals and they have a bunch of version specific code anyway. The gevent hit just looks like a fork of test_subprocess.py for each minor version of Python.

hauntsaninja pushed a commit that referenced this issue Jul 31, 2024
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
blhsing pushed a commit to blhsing/cpython that referenced this issue 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
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants