{"thread":{"id":"37791","subject":"[PATCH] git-gui/gitk: Do not depend on Cygwin's \"kill\" command on Windows","startedAt":"2014-10-23T19:30:54Z","lastAt":"2014-10-23T19:30:54Z","messageCount":1,"participants":["Sebastian Schuberth"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"250998","messageId":"5449576E.8040808__34825.0704505064$1414092921$gmane$org@gmail.com","threadId":"37791","inReplyTo":null,"subject":"[PATCH] git-gui/gitk: Do not depend on Cygwin's \"kill\" command on Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2014-10-23T19:30:54Z","receivedAt":"2014-10-23T19:30:54Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"Windows does not necessarily mean Cygwin, it could also be MSYS. The\nlatter ships with a version of \"kill\" that does not understand \"-f\". In\nmsysgit this was addressed shipping Cygwin's version of kill.\n\nProperly fix this by using the stock Windows \"taskkill\" command instead,\nwhich is available since Windows XP Professional.\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n git-gui/git-gui.sh | 4 +---\n gitk-git/gitk      | 2 +-\n 2 files changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex b186329..a1c823e 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -666,9 +666,7 @@ proc kill_file_process {fd} {\n \n \tcatch {\n \t\tif {[is_Windows]} {\n-\t\t\t# Use a Cygwin-specific flag to allow killing\n-\t\t\t# native Windows processes\n-\t\t\texec kill -f $process\n+\t\t\texec taskkill /pid $process\n \t\t} else {\n \t\t\texec kill $process\n \t\t}\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 3520bda..bfc5cfa 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -445,7 +445,7 @@ proc stop_instance {inst} {\n \tset pid [pid $fd]\n \n \tif {$::tcl_platform(platform) eq {windows}} {\n-\t    exec kill -f $pid\n+\t    exec taskkill /pid $pid\n \t} else {\n \t    exec kill $pid\n \t}\n-- \n1.8.4-mingw-3\n"}]}