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‎

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

0 commit comments

Comments
(0)