* [PATCH] git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows
@ 2014-10-23 19:30 Sebastian Schuberth
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Schuberth @ 2014-10-23 19:30 UTC (permalink / raw)
To: git; +Cc: msysGit
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows
@ 2014-10-23 19:30 Sebastian Schuberth
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Schuberth @ 2014-10-23 19:30 UTC (permalink / raw)
To: git; +Cc: msysGit
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-23 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 19:30 [PATCH] git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows Sebastian Schuberth
-- strict thread matches above, loose matches on Subject: below --
2014-10-23 19:30 Sebastian Schuberth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).