* Problem with timer in gpg.el
@ 2001-08-07 14:39 Andreas Jaeger
2001-08-10 17:21 ` ShengHuo ZHU
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Jaeger @ 2001-08-07 14:39 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]
I've got a problem with timers in gpg.el in XEmacs.
I regularly get the message:
itimer named "itimer-0" already existing and activated
The problem is that the value of gpg-passpthrase-timer is cached, the
implementation in XEmacs seems to require that a canceled timer is not used
anymore. The next time a new timer is used, in my case by perl, it
reuses the name "itimer-0", and then gpg get's a problem...
I'm appending a patch that solved the problem for me,
Andreas
2001-08-07 Andreas Jaeger <aj@suse.de>
* gpg.el (gpg-passphrase-forget): Don't cache
gpg-passphrase-timer.
(gpg-passphrase-store): Check if gpg-passphrase-timer is
initialized already.
Index: gpg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/contrib/gpg.el,v
retrieving revision 1.14
diff -u -p -r1.14 gpg.el
--- gpg.el 2001/07/30 23:04:20 1.14
+++ gpg.el 2001/08/07 12:44:03
@@ -801,6 +801,7 @@ evaluates BODY, like `progn'. If BODY e
"Forget stored passphrase."
(interactive)
(cancel-timer gpg-passphrase-timer)
+ (setq gpg-passphrase-timer nil)
(gpg-passphrase-clear-string gpg-passphrase)
(setq gpg-passphrase nil))
@@ -808,6 +809,8 @@ evaluates BODY, like `progn'. If BODY e
"Store PASSPHRASE in cache.
Updates the timeout for clearing the cache to `gpg-passphrase-timeout'."
(unless (equal gpg-passphrase-timeout 0)
+ (if (null gpg-passphrase-timer)
+ (setq gpg-passphrase-timer (timer-create)))
(timer-set-time gpg-passphrase-timer
(timer-relative-time (current-time)
gpg-passphrase-timeout))
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
[-- Attachment #2: Type: application/pgp-signature, Size: 231 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem with timer in gpg.el
2001-08-07 14:39 Problem with timer in gpg.el Andreas Jaeger
@ 2001-08-10 17:21 ` ShengHuo ZHU
0 siblings, 0 replies; 2+ messages in thread
From: ShengHuo ZHU @ 2001-08-10 17:21 UTC (permalink / raw)
Andreas Jaeger <aj@suse.de> writes:
> I've got a problem with timers in gpg.el in XEmacs.
>
> I regularly get the message:
> itimer named "itimer-0" already existing and activated
>
> The problem is that the value of gpg-passpthrase-timer is cached, the
> implementation in XEmacs seems to require that a canceled timer is not used
> anymore. The next time a new timer is used, in my case by perl, it
> reuses the name "itimer-0", and then gpg get's a problem...
>
> I'm appending a patch that solved the problem for me,
> Andreas
>
> 2001-08-07 Andreas Jaeger <aj@suse.de>
>
> * gpg.el (gpg-passphrase-forget): Don't cache
> gpg-passphrase-timer.
> (gpg-passphrase-store): Check if gpg-passphrase-timer is
> initialized already.
Added to the Gnus CVS.
ShengHuo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-10 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-07 14:39 Problem with timer in gpg.el Andreas Jaeger
2001-08-10 17:21 ` ShengHuo ZHU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).