]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tq.el edge case
authorMiles Bader <miles@gnu.org>
Wed, 30 May 2007 14:06:39 +0000 (14:06 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 30 May 2007 14:06:39 +0000 (14:06 +0000)
(tq-queue-pop): Stifle error when a process has died and we are trying to
send a signal to it.  The program using tq.el should periodically check
to see whether the process has died and react appropriately -- this is
not the responsibility of tq.el, and is consistent with the rest of the
tq.el source code.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-779
Creator:  Michael Olson <mwolson@gnu.org>

lisp/ChangeLog
lisp/emacs-lisp/tq.el

index d7b3a105d6026f4c4e3db6aafa1dbd65629cb2c2..9a79d4a0b55305a613eb817c6a8120fd121b2911 100644 (file)
@@ -1,3 +1,11 @@
+2007-05-30  Michael Olson  <mwolson@gnu.org>
+
+       * emacs-lisp/tq.el (tq-queue-pop): Stifle error when a process has
+       died and we are trying to send a signal to it.  The program using
+       tq.el should periodically check to see whether the process has
+       died and react appropriately -- this is not the responsibility of
+       tq.el, and is consistent with the rest of the tq.el source code.
+
 2007-05-29  Martin Rudalics  <rudalics@gmx.at>
 
        * textmodes/table.el (table--point-entered-cell-function)
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)