Skip to content

Commit f445f80

Browse files
committed
adjust for gh-85028
1 parent 43bc40b commit f445f80

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Lib/subprocess.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
16961696
# the ones in the handle_list
16971697
close_fds = False
16981698

1699-
if force_hide or shell:
1699+
if force_hide or (shell and not (startupinfo.dwFlags & _winapi.STARTF_USESHOWWINDOW)):
17001700
# We pass SW_HIDE to the process so that it will not display any
17011701
# window even if it normally would.
17021702
startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
@@ -1713,9 +1713,6 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
17131713
creationflags |= _winapi.CREATE_NEW_CONSOLE
17141714

17151715
if shell:
1716-
if not startupinfo.dwFlags & _winapi.STARTF_USESHOWWINDOW:
1717-
startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
1718-
startupinfo.wShowWindow = _winapi.SW_HIDE
17191716
if not executable:
17201717
# gh-101283: without a fully-qualified path, before Windows
17211718
# checks the system directories, it first looks in the

0 commit comments

Comments
 (0)