-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-44572: On Windows platform disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption #27092
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
Conversation
…er() to prevent erroneous STDIN consumption
Thanks for the pull request! The only thing left is to add the NEWS entry, which should be straightforward for you to click on its "Details" link and fill out. The description will be under the Windows section, so just a line like |
Thanks @Konstantin-Glukhov for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Thanks @Konstantin-Glukhov for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
GH-27124 is a backport of this pull request to the 3.10 branch. |
…prevent erroneous STDIN consumption (pythonGH-27092) (cherry picked from commit 0ee0a74) Co-authored-by: Konstantin-Glukhov <[email protected]>
GH-27125 is a backport of this pull request to the 3.9 branch. |
…prevent erroneous STDIN consumption (pythonGH-27092) (cherry picked from commit 0ee0a74) Co-authored-by: Konstantin-Glukhov <[email protected]>
…prevent erroneous STDIN consumption (GH-27092) (GH-27124) (cherry picked from commit 0ee0a74) Co-authored-by: Konstantin-Glukhov <[email protected]>
…prevent erroneous STDIN consumption (GH-27092) (cherry picked from commit 0ee0a74) Co-authored-by: Konstantin-Glukhov <[email protected]>
If script.py contains a call to platform.win32* functions the following invocation
inadvertently consumes STDIN redirected from file:
python.exe script.py < file
To address the issue, stdin=subprocess.DEVNULL argument needs to be added to subprocess.check_output() call in platform._syscmd_ver().
https://bugs.python.org/issue44572