public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alexander Gavrilov <angavrilov@gmail•com>
To: git@vger•kernel.org
Cc: Paul Mackerras <paulus@samba•org>
Subject: [PATCH (GITK) 3/3] gitk: On Windows use a Cygwin-specific flag for kill.
Date: Fri, 18 Jul 2008 09:47:40 +0400	[thread overview]
Message-ID: <200807180947.40515.angavrilov@gmail.com> (raw)
In-Reply-To: <200807180946.43560.angavrilov@gmail.com>

MSysGit compiles git binaries as native Windows executables,
so they cannot be killed unless a special flag is specified.

This flag is implemented by the Cygwin version of kill,
which is also included in MSysGit.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail•com>
---
 gitk |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gitk b/gitk
index b523c98..d7fea26 100755
--- a/gitk
+++ b/gitk
@@ -388,7 +388,12 @@ proc stop_instance {inst} {
     set fd $commfd($inst)
     catch {
 	set pid [pid $fd]
-	exec kill $pid
+
+	if {$::tcl_platform(platform) eq {windows}} {
+	    exec kill -f $pid
+	} else {
+	    exec kill $pid
+	}
     }
     catch {close $fd}
     nukefile $fd
-- 
1.5.6.2.39.gd084

      reply	other threads:[~2008-07-18  5:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18  5:44 [PATCH (GITK) 0/3] Avoid runaway processes in gitk Alexander Gavrilov
2008-07-18  5:45 ` [PATCH (GITK) 1/3] gitk: Kill back-end processes on window close Alexander Gavrilov
2008-07-18  5:46   ` [PATCH (GITK) 2/3] gitk: Register diff-files & diff-index in commfd, to ensure kill Alexander Gavrilov
2008-07-18  5:47     ` Alexander Gavrilov [this message]

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=200807180947.40515.angavrilov@gmail.com \
    --to=angavrilov@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox