Skip to content

Commit 572ebd6

Browse files
committed
creationflags must be set to 0 on non-windows platforms
1 parent d79951f commit 572ebd6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎git/cmd.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
safe_decode,
4444
)
4545

46+
# value of Windows process creation flag taken from MSDN
47+
CREATE_NO_WINDOW=0x08000000
48+
4649
execute_kwargs= ('istream', 'with_keep_cwd', 'with_extended_output',
4750
'with_exceptions', 'as_process', 'stdout_as_string',
4851
'output_stream', 'with_stdout', 'kill_after_timeout',
@@ -610,10 +613,9 @@ def execute(self, command,
610613

611614
try:
612615
ifsys.platform=='win32':
613-
CREATE_NO_WINDOW=0x08000000
614616
creationflags=CREATE_NO_WINDOW
615617
else:
616-
creationflags=None
618+
creationflags=0
617619

618620
proc=Popen(command,
619621
env=env,
@@ -637,10 +639,9 @@ def execute(self, command,
637639
def_kill_process(pid):
638640
""" Callback method to kill a process. """
639641
ifsys.platform=='win32':
640-
CREATE_NO_WINDOW=0x08000000
641642
creationflags=CREATE_NO_WINDOW
642643
else:
643-
creationflags=None
644+
creationflags=0
644645

645646
p=Popen(['ps', '--ppid', str(pid)], stdout=PIPE, creationflags=creationflags)
646647
child_pids= []

0 commit comments

Comments
(0)