Skip to content

Commit dbbcaf7

Browse files
OswinNathanialdpursehouse
authored andcommitted
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
1 parent d06e76b commit dbbcaf7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git/cmd.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,10 @@ def _kill_process(pid):
618618
try:
619619
os.kill(pid, SIGKILL)
620620
for child_pid in child_pids:
621-
os.kill(child_pid, SIGKILL)
621+
try:
622+
os.kill(child_pid, SIGKILL)
623+
except OSError:
624+
pass
622625
kill_check.set() # tell the main routine that the process was killed
623626
except OSError:
624627
# It is possible that the process gets completed in the duration after timeout

0 commit comments

Comments
 (0)