Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b295c13 commit 05a302cCopy full SHA for 05a302c
git/cmd.py
@@ -14,7 +14,7 @@
14
import mmap
15
16
from contextlib import contextmanager
17
-from signal import SIGKILL
+import signal
18
from subprocess import (
19
call,
20
Popen,
@@ -617,10 +617,12 @@ def _kill_process(pid):
617
if local_pid.isdigit():
618
child_pids.append(int(local_pid))
619
try:
620
- os.kill(pid, SIGKILL)
+ # Windows does not have SIGKILL, so use SIGTERM instead
621
+ sig = getattr(signal, 'SIGKILL', signal.SIGTERM)
622
+ os.kill(pid, sig)
623
for child_pid in child_pids:
624
- os.kill(child_pid, SIGKILL)
625
+ os.kill(child_pid, sig)
626
except OSError:
627
pass
628
kill_check.set() # tell the main routine that the process was killed
0 commit comments