summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorBarry Scott <barry@barrys-emacs.org>2016-08-01 11:09:20 +0100
committerBarry Scott <barry@barrys-emacs.org>2016-08-01 11:09:20 +0100
commit572ebd6e92cca39100183db7bbeb6b724dde0211 (patch)
tree50901e4f2abb531e6aad222250ba6fe83a4f2f95 /git/cmd.py
parentd79951fba0994654104128b1f83990387d44ac22 (diff)
downloadgitpython-572ebd6e92cca39100183db7bbeb6b724dde0211.tar.gz
creationflags must be set to 0 on non-windows platforms
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 5c4cd5e9..00a73e33 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -43,6 +43,9 @@ from git.compat import (
safe_decode,
)
+# value of Windows process creation flag taken from MSDN
+CREATE_NO_WINDOW = 0x08000000
+
execute_kwargs = ('istream', 'with_keep_cwd', 'with_extended_output',
'with_exceptions', 'as_process', 'stdout_as_string',
'output_stream', 'with_stdout', 'kill_after_timeout',
@@ -610,10 +613,9 @@ class Git(LazyMixin):
try:
if sys.platform == 'win32':
- CREATE_NO_WINDOW = 0x08000000
creationflags = CREATE_NO_WINDOW
else:
- creationflags = None
+ creationflags = 0
proc = Popen(command,
env=env,
@@ -637,10 +639,9 @@ class Git(LazyMixin):
def _kill_process(pid):
""" Callback method to kill a process. """
if sys.platform == 'win32':
- CREATE_NO_WINDOW = 0x08000000
creationflags = CREATE_NO_WINDOW
else:
- creationflags = None
+ creationflags = 0
p = Popen(['ps', '--ppid', str(pid)], stdout=PIPE, creationflags=creationflags)
child_pids = []