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)
committerPaul Mackerras <paulus@samba.org>
Wed, 29 Oct 2014 22:43:11 +0000 (09:43 +1100)
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 by 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: Paul Mackerras <paulus@samba.org>
gitk
diff --git a/gitk b/gitk
index 3520bdaebc29fd6c93724b0a46484ee5e9403831..bfc5cfabd312ff6efe43bb84fe9e8d0f0d970ab1 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -445,7 +445,7 @@ proc stop_instance {inst} {
        set pid [pid $fd]
 
        if {$::tcl_platform(platform) eq {windows}} {
-           exec kill -f $pid
+           exec taskkill /pid $pid
        } else {
            exec kill $pid
        }