Function: epg-wait-for-status

epg-wait-for-status is a byte-compiled function defined in epg.el.gz.

Signature

(epg-wait-for-status CONTEXT STATUS-LIST)

Documentation

Wait until one of elements in STATUS-LIST arrives.

Source Code

;; Defined in /usr/src/emacs/lisp/epg.el.gz
(defun epg-wait-for-status (context status-list)
  "Wait until one of elements in STATUS-LIST arrives."
  (with-current-buffer (process-buffer (epg-context-process context))
    (setq epg-pending-status-list status-list)
    (while (and (eq (process-status (epg-context-process context)) 'run)
		epg-pending-status-list)
      (accept-process-output (epg-context-process context) 1))
    (if epg-pending-status-list
	(epg-context-set-result-for
	 context 'error
	 (cons '(exit)
	       (epg-context-result-for context 'error))))))