From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37579 Path: main.gmane.org!not-for-mail From: Andreas Jaeger Newsgroups: gmane.emacs.gnus.general Subject: Problem with timer in gpg.el Date: Tue, 07 Aug 2001 16:39:34 +0200 Sender: aj@suse.de Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: main.gmane.org 1035172968 14577 80.91.224.250 (21 Oct 2002 04:02:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:02:48 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 2724 invoked from network); 7 Aug 2001 14:40:08 -0000 Original-Received: from ns.suse.de (HELO Cantor.suse.de) (213.95.15.193) by gnus.org with SMTP; 7 Aug 2001 14:40:08 -0000 Original-Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 2527F1E70E for ; Tue, 7 Aug 2001 16:39:53 +0200 (MEST) X-Authentication-Warning: gee.suse.de: aj set sender to aj@suse.de using -f Original-To: ding@gnus.org User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence) Original-Lines: 52 Xref: main.gmane.org gmane.emacs.gnus.general:37579 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37579 --=-=-= Content-Transfer-Encoding: quoted-printable 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 * gpg.el (gpg-passphrase-forget): Don't cache gpg-passphrase-timer. (gpg-passphrase-store): Check if gpg-passphrase-timer is initialized already. =20 Index: gpg.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/contrib/gpg.el,v retrieving revision 1.14 diff -u -p -r1.14 gpg.el =2D-- 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)) =20 @@ -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=20 (timer-relative-time (current-time)=20 gpg-passphrase-timeout)) =2D-=20 Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7b/2oOJpWPMJyoSYRAhzrAJ9BjG2eLYsoTkJNB93Z430Fj2T1rwCePma5 sWkKlCepBYBJZi0h2IU4vL0= =3ceL -----END PGP SIGNATURE----- --=-=-=--