diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-26 19:42:42 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-26 20:54:12 +0200 |
commit | 45f8f20bdf1447fbfebd19a07412d337626ed6b0 (patch) | |
tree | dfd959548fb72122df7358c062a32bcff3acf4a1 /git/index | |
parent | 783ad99b92faa68c5cc2550c489ceb143a93e54f (diff) | |
download | gitpython-45f8f20bdf1447fbfebd19a07412d337626ed6b0.tar.gz |
Win, #519: FIX WinHangs: Popen() CREATE_NEW_PROCESS_GROUP to allow kill
+ FIXED most hangs BUT no more `git-daemon` un-killable!
+ Use logger for utils to replace stray print().
Diffstat (limited to 'git/index')
-rw-r--r-- | git/index/fun.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/git/index/fun.py b/git/index/fun.py index 6026e232..818847a2 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -12,11 +12,10 @@ from stat import ( from io import BytesIO import os -import sys import subprocess from git.util import IndexFileSHA1Writer -from git.cmd import Git +from git.cmd import PROC_CREATIONFLAGS from git.exc import ( UnmergedEntriesError, HookExecutionError @@ -78,7 +77,7 @@ def run_commit_hook(name, index): cwd=index.repo.working_dir, close_fds=(os.name == 'posix'), universal_newlines=True, - creationflags=Git.CREATE_NO_WINDOW if sys.platform == 'win32' else 0,) + creationflags=PROC_CREATIONFLAGS,) stdout, stderr = cmd.communicate() cmd.stdout.close() cmd.stderr.close() |