git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows
authorSebastian Schuberth <sschuberth@gmail.com>
Thu, 23 Oct 2014 19:30:54 +0000 (21:30 +0200)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Thu, 6 Nov 2014 22:13:32 +0000 (22:13 +0000)
Windows does not necessarily mean Cygwin, it could also be MSYS. The
latter ships with a version of "kill" that does not understand "-f". In
msysgit this was addressed shipping Cygwin's version of kill.

Properly fix this by using the stock Windows "taskkill" command instead,
which is available since Windows XP Professional.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh

index bf68699..dc53e9a 100755 (executable)
@@ -670,9 +670,7 @@ proc kill_file_process {fd} {
 
        catch {
                if {[is_Windows]} {
-                       # Use a Cygwin-specific flag to allow killing
-                       # native Windows processes
-                       exec kill -f $process
+                       exec taskkill /pid $process
                } else {
                        exec kill $process
                }