summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorOswin Nathanial <oswin.x.nathanial@sonymobile.com>2015-10-13 11:51:05 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2015-10-13 13:53:45 +0900
commitdbbcaf7a355e925911fa77e204dd2c38ee633c0f (patch)
tree40cbff904f7dfabe40f7c61b58f6dd1a74483d3a /git
parentd06e76bb243dda3843cfaefe7adc362aab2b7215 (diff)
downloadgitpython-dbbcaf7a355e925911fa77e204dd2c38ee633c0f.tar.gz
Run os.kill for all child pids even after some of them are down
Right now, we come out of the iteration in case of failure while trying to kill a child pid. This may result in some of the child pids staying alive. Change-Id: I18d58fcefec2bbdae4ae9bf73594939ade241b52
Diffstat (limited to 'git')
-rw-r--r--git/cmd.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/git/cmd.py b/git/cmd.py
index a7435497..af019f13 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -618,7 +618,10 @@ class Git(LazyMixin):
try:
os.kill(pid, SIGKILL)
for child_pid in child_pids:
- os.kill(child_pid, SIGKILL)
+ try:
+ os.kill(child_pid, SIGKILL)
+ except OSError:
+ pass
kill_check.set() # tell the main routine that the process was killed
except OSError:
# It is possible that the process gets completed in the duration after timeout