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: Thu, 22 Feb 2007 13:09:40 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

Chong Yidong <address@hidden> writes:

> address@hidden (Kim F. Storm) writes:
>
>> 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.
>> [...]
>>              (accept-process-output process nil nil 1))
>>
>>
>> But we may also need to define SYNC_INPUT to make this work reliable ??
>
> That accept-process-output is done after sending gpg the text that we
> want to encrypy/decrypt.  Gpg calls pinentry *before* accepting the
> text.

The code looks like this:

(setq process (start-process ...))
(process-send process ...)
(process-send-region process ...)
(process-send-eof process)
(accept-process-output process ...)

If we use SYNC_INPUT, I don't see where Emacs would read any keyboard input
between start-process and accept-process-output.  I suppose that pinentry
uses the tty in that time-frame...

Would someone pls. test if it works with the change I suggested --
possibly after recompiling Emacs with CFLAGS=-DSYNC_INPUT ...


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





reply via email to

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