Subject: Re: bug#2412: spurious "Sign failed" errors

From: Daiki Ueno <[email-masked]>
Date: Sun, 03 May 2009 14:43:42 +0900

Hi,

Sven Joachim <[email-masked]> writes:

>>> could you please try (setq epg-debug t) and show me the contents of
>>> " *epg-debug*" buffer next time you see the error?

> Looks innocent enough to me:

> | [GNUPG:] SIG_CREATED D 17 2 01 1239906974 9AACBC0C69283380715D3788ECB679C787E9AABE
> | [GNUPG:] SIG_CREATED D 17 2 01 1239906984 9AACBC0C69283380715D3788ECB679C787E9AABE

Thanks.  It looks innocent for me too, but now I can suspect a timing
problem.  Could you please try the patch attached below?

diff --git a/lisp/epg.el b/lisp/epg.el
index e96258f..3c80ef9 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1175,7 +1175,8 @@ This function is for internal use only."
 (defun epg-wait-for-completion (context)
   "Wait until the `epg-gpg-program' process completes."
   (while (eq (process-status (epg-context-process context)) 'run)
-    (accept-process-output (epg-context-process context) 1)))
+    (accept-process-output (epg-context-process context) 1))
+  (sleep-for 0.1))
 
 (defun epg-reset (context)
   "Reset the CONTEXT."

Regards,
-- 
Daiki Ueno