From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.86.59.13 with SMTP id h13cs37388fga; Thu, 18 Feb 2010 10:14:34 -0800 (PST) Received: by 10.224.48.15 with SMTP id p15mr2735978qaf.198.1266516872677; Thu, 18 Feb 2010 10:14:32 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 7si8515682qwf.44.2010.02.18.10.14.32; Thu, 18 Feb 2010 10:14:32 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 1EDBC1588079; Thu, 18 Feb 2010 13:14:32 -0500 (EST) Received: from twice-irc.de (mx2.twice-irc.de [79.140.35.195]) by rubyforge.org (Postfix) with ESMTP id 2B54D185826F for ; Thu, 18 Feb 2010 13:10:09 -0500 (EST) Received: from midna.zekjur.net (midna.zekjur.net [IPv6:2001:4d88:1008:4242:21c:c0ff:fe7e:4776]) by twice-irc.de (Postfix) with ESMTPSA id 55BDD166560 for ; Thu, 18 Feb 2010 19:10:08 +0100 (CET) Received: by midna.zekjur.net (Postfix, from userid 101) id A9477321F3; Thu, 18 Feb 2010 19:10:07 +0100 (CET) From: Michael Stapelberg To: sup-talk In-reply-to: <1265574271-sup-5738@midna.zekjur.net> References: <1265569783-sup-1789@khjk.org> <1265574271-sup-5738@midna.zekjur.net> Date: Thu, 18 Feb 2010 19:10:07 +0100 Message-Id: <1266516237-sup-7845@midna.zekjur.net> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Content-Type: multipart/mixed; boundary="=-1266516607-660637-4776-1092-3-=" MIME-Version: 1.0 Subject: Re: [sup-talk] curses pinentry woes (still) X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org --=-1266516607-660637-4776-1092-3-= Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Hi, Excerpts from Michael Stapelberg's message of So Feb 07 21:25:57 +0100 2010: > Excerpts from Sven Moritz Hallberg's message of So Feb 07 20:10:04 +0100 2010: > > Whenever gpg-agent starts pinentry-curses with sup running, the interface gets > > "messed up". Unfortunately, I'm still experiencing such a problem with sup > > version 0.10.2. Further debugging told me that it is a thread related problem. You can work around it by disabling threads when starting sup using the -n option. The problem seems to be that other threads still run while one thread calls system (which in turn uses fork, which seems to be the real cause of the problem). Even using Thread.critical = true does not fix the problem (it is removed in ruby 1.9 anyways). I’ve attached a proof of concept which illustrates the problem. Could anyone with a little more insight into ruby threads have a look at this issue please? Specifically, if you comment out the call to reporting_thread in lib/sup/modes/thread-index-mode.rb:101, it seems to work. Best regards, Michael --=-1266516607-660637-4776-1092-3-= Content-Disposition: attachment; filename="poc.rb" Content-Type: application/octet-stream; name="poc.rb" Content-Transfer-Encoding: base64 IyEvdXNyL2Jpbi9lbnYgcnVieQoKcmVxdWlyZSAndGhyZWFkJwoKbyA9IFRo cmVhZC5uZXcgewogIGNvdW50ID0gMAogIHdoaWxlIGNvdW50IDwgMyBkbwog ICAgcHV0cyAib2hhaSBmcm9tICN7UHJvY2Vzcy5waWR9IgogICAgc2xlZXAg MQogICAgY291bnQgPSBjb3VudCArIDEKICBlbmQKfQoKVGhyZWFkLmNyaXRp Y2FsID0gdHJ1ZQoKIyBUaGlzIGRvZXMgbm90IHdvcms6CnBpZCA9IHN5c3Rl bSAic2xlZXAgMjsgZWNobyBkb25lIgoKIyBUaGlzIGRvZXMgd29yayAob3V0 cHV0IGRvZXMgbm90IGdldCBpbnRlcnJ1cHRlZCk6CiNjb3VudCA9IDAKI3do aWxlIGNvdW50IDwgNSBkbwojICBwdXRzICJ3YWl0ISIKIyAgY291bnQgPSBj b3VudCArIDEKIyAgc2xlZXAgMgojZW5kCgpUaHJlYWQuY3JpdGljYWwgPSBm YWxzZQo= --=-1266516607-660637-4776-1092-3-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk --=-1266516607-660637-4776-1092-3-=--