From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Fix needed for communication with gpg-agent Date: Sat, 24 Feb 2007 01:57:01 +0100 Message-ID: References: <87irdzs6pp.fsf@stupidchicken.com> <87r6siy5he.fsf@wheatstone.g10code.de> <87abz4cv8l.fsf@stupidchicken.com> <878xeoiezq.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172278618 31520 80.91.229.12 (24 Feb 2007 00:56:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Feb 2007 00:56:58 +0000 (UTC) Cc: wilde@sha-bang.de, Werner Koch , ueno@unixuser.org, rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 24 01:56:50 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HKlDV-0006Uo-0s for ged-emacs-devel@m.gmane.org; Sat, 24 Feb 2007 01:56:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKlDU-0001Oj-S6 for ged-emacs-devel@m.gmane.org; Fri, 23 Feb 2007 19:56:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HKlDI-0001L2-U6 for emacs-devel@gnu.org; Fri, 23 Feb 2007 19:56:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HKlDI-0001KP-Eq for emacs-devel@gnu.org; Fri, 23 Feb 2007 19:56:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKlDI-0001KE-7L for emacs-devel@gnu.org; Fri, 23 Feb 2007 19:56:36 -0500 Original-Received: from pfepa.post.tele.dk ([195.41.46.235]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HKlDF-00029y-Om; Fri, 23 Feb 2007 19:56:34 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx19.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id ED933FAC00E; Sat, 24 Feb 2007 01:56:18 +0100 (CET) In-Reply-To: <878xeoiezq.fsf@stupidchicken.com> (Chong Yidong's message of "Fri\, 23 Feb 2007 19\:19\:37 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66722 Archived-At: Chong Yidong writes: > storm@cua.dk (Kim F. Storm) writes: > >> Noone has yet explained why using accept-process-output to wait just >> for the pgp process and not process keyboard input while waiting is >> not sufficient. >> >> If we need to enable SYNC_INPUT for that to work, and we don't want to >> do that in general, we could make a negative "just-this-one" arg mean >> "wait for single process to terminate with input blocked." >> >> I.e. a call like this: >> >> (accept-process-output process nil nil -1) >> >> We would only have to do that on a terminal, as pinentry works fine on >> X already. >> >> Any readon that wouldn't work?? > > Have you tried it? No -- the version of gpg I have doesn't have the gpg-agent. I haven't had time to upgrade. > When I tried, gpg quits immediately, with or > without SYNC_INPUT; I can't debug it because I don't understand how > this idea is supposed to work in the first place. IIUC, incoming tty > input in stored by Emacs, never forwarded to the gpg process. Ok, so you say that Emacs does monopolise the tty, reading all input (or at least blocking anyone else from reading from the tty). IIRC, someone else said that pinentry was able to read _something_ but that it was very difficult to actually read a working password (because Emacs would read some of the input). So what's the truth here? In any case, I support your proposal to document the current restrictions for Emacs on terminals -- anything else seems too complex at this time. After the release, I think we should work closely with the gpg team on a long term solution for making Emacs 23 and pinentry co-operate also on a terminal (maybe the multi-tty branch has some additional things to consider too). -- Kim F. Storm http://www.cua.dk