Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Lib/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,8 +1401,9 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
close_fds = False

if shell:
startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _winapi.SW_HIDE
if not startupinfo.dwFlags & _winapi.STARTF_USESHOWWINDOW:
startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _winapi.SW_HIDE
comspec = os.environ.get("COMSPEC", "cmd.exe")
args = '{} /c "{}"'.format (comspec, args)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
On Windows, :class:`subprocess.Popen` no longer sets ``wShowWindow`` if the
``startupinfo`` argument has the flag ``STARTF_USESHOWWINDOW``.
Comment on lines +1 to +2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It describes what the code does, but not what it means for the user.

It can be acceptable in the commit message, but not in the NEWS entry. Please describe the change in terms of user visible effects.