changeset 77890:57715561e846

(tq-queue-pop): Stifle error when a process has died and we are trying to send a signal to it.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 04 Jun 2007 23:15:08 +0000
parents e41f2897e2fe
children 4ae3b6748985
files lisp/emacs-lisp/tq.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/tq.el	Mon Jun 04 23:14:56 2007 +0000
+++ b/lisp/emacs-lisp/tq.el	Mon Jun 04 23:15:08 2007 +0000
@@ -100,8 +100,9 @@
 (defun tq-queue-pop (tq)
   (setcar tq (cdr (car tq)))
   (let ((question (tq-queue-head-question tq)))
-    (when question
-      (process-send-string (tq-process tq) question)))
+    (condition-case nil
+	(process-send-string (tq-process tq) question)
+      (error nil)))
   (null (car tq)))
 
 (defun tq-enqueue (tq question regexp closure fn &optional delay-question)