]> git.eshelyaron.com Git - emacs.git/commitdiff
(tq-queue-pop): Stifle error when a process has died and we are trying
authorChong Yidong <cyd@stupidchicken.com>
Mon, 4 Jun 2007 23:15:08 +0000 (23:15 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 4 Jun 2007 23:15:08 +0000 (23:15 +0000)
to send a signal to it.

lisp/emacs-lisp/tq.el

index b12c21b6730c66bb02ae2e1ebb2169cfefa30ac3..f20015fd7201aaac2da06965db67702498e2a2d8 100644 (file)
@@ -100,8 +100,9 @@ to a tcp server on another machine."
 (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)