emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix needed for communication with gpg-agent


From: Kim F. Storm
Subject: Re: Fix needed for communication with gpg-agent
Date: Sat, 24 Feb 2007 00:58:57 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

Chong Yidong <address@hidden> writes:

> Richard Stallman <address@hidden> writes:
>
>> It should not be hard to program Emacs to turn off the signal handler
>> for tty input while it calls gpg.  That way, Emacs won't notice there
>> is any input, and won't read any.
>>
>> This could be a new function made as a variant of call-process.
>>
>> Would this solve the problem?
>
> I think you're assuming that Emacs calls gpg as a synchronous process:
> i.e. call gpg, turn off tty input, wait for gpg to finish, restore tty
> input.  The way the PGG code is currently set up, Emacs calls gpg as
> an asynchronous process, and uses process-send-string to send gpg the
> input text that we want to encrypt.

It is still "synchronous" in the sense that we wait for the process
to finish before continuing...

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??

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]