Skip to content

Fixed a non-Windows import #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import mmap

from contextlib import contextmanager
from signal import SIGKILL
import signal
from subprocess import (
call,
Popen,
Expand Down Expand Up @@ -617,10 +617,12 @@ def _kill_process(pid):
if local_pid.isdigit():
child_pids.append(int(local_pid))
try:
os.kill(pid, SIGKILL)
# Windows does not have SIGKILL, so use SIGTERM instead
sig = getattr(signal, 'SIGKILL', signal.SIGTERM)
os.kill(pid, sig)
for child_pid in child_pids:
try:
os.kill(child_pid, SIGKILL)
os.kill(child_pid, sig)
except OSError:
pass
kill_check.set() # tell the main routine that the process was killed
Expand Down