From: Sebastian Schuberth <sschuberth@gmail.com>
To: git@vger.kernel.org
Cc: msysGit <msysgit@googlegroups.com>
Subject: [PATCH] git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows
Date: Thu, 23 Oct 2014 21:30:54 +0200 [thread overview]
Message-ID: <5449576E.8040808@gmail.com> (raw)
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>
---
git-gui/git-gui.sh | 4 +---
gitk-git/gitk | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index b186329..a1c823e 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -666,9 +666,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
}
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 3520bda..bfc5cfa 100755
--- a/gitk-git/gitk
+++ b/gitk-git/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
}
--
1.8.4-mingw-3
next reply other threads:[~2014-10-23 19:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 19:30 Sebastian Schuberth [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-10-23 19:30 [PATCH] git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows Sebastian Schuberth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5449576E.8040808@gmail.com \
--to=sschuberth@gmail.com \
--cc=git@vger.kernel.org \
--cc=msysgit@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.