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: Thu, 22 Feb 2007 00:15:16 +0100 Message-ID: References: <87irdzs6pp.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 1172099719 11915 80.91.229.12 (21 Feb 2007 23:15:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Feb 2007 23:15:19 +0000 (UTC) Cc: Werner Koch , Chong Yidong , Daiki Ueno , rms@gnu.org, emacs-devel@gnu.org To: Sascha Wilde Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 22 00:15:11 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 1HK0g2-0008Si-Lk for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 00:15:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK0g2-00042K-0E for ged-emacs-devel@m.gmane.org; Wed, 21 Feb 2007 18:15:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HK0fq-0003zs-SY for emacs-devel@gnu.org; Wed, 21 Feb 2007 18:14:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HK0fn-0003vN-Qq for emacs-devel@gnu.org; Wed, 21 Feb 2007 18:14:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK0fn-0003v2-Ho for emacs-devel@gnu.org; Wed, 21 Feb 2007 18:14:55 -0500 Original-Received: from pfepa.post.tele.dk ([195.41.46.235]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HK0fj-0005W4-AL; Wed, 21 Feb 2007 18:14:51 -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 44EFEFAC012; Thu, 22 Feb 2007 00:14:29 +0100 (CET) In-Reply-To: (Sascha Wilde's message of "Wed\, 21 Feb 2007 23\:41\:46 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (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:66588 Archived-At: Sascha Wilde writes: > A few more in depth tests[0] tests show, that emacs some how catches > some of the input, which is meant to go to pinentry: The pinentry > curses interface is already shown, when emacs still gets some of the > key events... So pinentry CAN read some input ... Since this was the main problem which we were concerned with, the problem is reduced to find a way to block Emacs from reading from the tty while pinentry needs it. Here's one way that might work (untested): Currently, pgg.el uses code like this: (while (eq 'run (process-status process)) (accept-process-output process 5)) Replacing this with the following would (in principle) prevent Emacs from reading any input while waiting for the process to terminate. (if window-system (while (eq 'run (process-status process)) (accept-process-output process 5)) ;; Don't read from tty in case pinentry needs it. (accept-process-output process nil nil 1)) But we may also need to define SYNC_INPUT to make this work reliable ?? -- Kim F. Storm http://www.cua.dk