git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Anders Kaseorg <andersk@MIT.EDU>, git@vger.kernel.org
Subject: [PATCH git-gui] git-gui--askpass: Do not hang on exit
Date: Sun, 4 Jul 2010 16:21:25 -0500	[thread overview]
Message-ID: <20100704212125.GA1613@burratino> (raw)
In-Reply-To: <20100704203342.6064.32250.reportbug@balanced-tree>

Anders Kaseorg wrote:

> When git-gui--askpass is manually copied from the source into
> /usr/lib/git-core, though, it doesn’t particularly work; its window
> just freezes after the password is typed.

The problem seems to be the

  bind . <Destroy>    {exit $::rc}

line; apparently each exit causes the window to be destroyed again,
resulting in git gui hanging.

Reported-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---

diff --git a/git-gui--askpass b/git-gui--askpass
index 12e117e..1537f75 100755
--- a/git-gui--askpass
+++ b/git-gui--askpass
@@ -39,7 +39,7 @@ pack .b -side bottom -fill x -padx 10 -pady 10
 bind . <Visibility> {focus -force .e}
 bind . <Key-Return> finish
 bind . <Key-Escape> {destroy .}
-bind . <Destroy>    {exit $rc}
+bind . <Destroy>    {exit $::rc}
 
 proc finish {} {
 	if {$::yesno} {
@@ -52,7 +52,9 @@ proc finish {} {
 
 	set ::rc 0
 	puts $::answer
+	bind . <Destroy> {}
 	destroy .
+	exit 0
 }
 
 wm title . "OpenSSH"
-- 

       reply	other threads:[~2010-07-04 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100704203342.6064.32250.reportbug@balanced-tree>
2010-07-04 21:21 ` Jonathan Nieder [this message]
2010-07-04 21:24   ` [PATCH v2 git-gui] git-gui--askpass: Do not hang on exit Jonathan Nieder
2010-08-14 23:21     ` [PATCH] git-gui: change the termination checks to avoid potential hang Pat Thoyts
2010-08-18  4:21       ` Jonathan Nieder
2010-08-18 22:48         ` Pat Thoyts
2010-08-15 23:53     ` [PATCH v2 git-gui] git-gui--askpass: Do not hang on exit Pat Thoyts

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=20100704212125.GA1613@burratino \
    --to=jrnieder@gmail.com \
    --cc=andersk@MIT.EDU \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /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 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).