From 7a781a5480b9a1f55d28a76e1d1f89aaa2421f97 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 30 May 2007 14:06:39 +0000 Subject: [PATCH] Fix tq.el edge case (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 --- lisp/ChangeLog | 8 ++++++++ lisp/emacs-lisp/tq.el | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7b3a105d60..9a79d4a0b55 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2007-05-30 Michael Olson + + * 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 * textmodes/table.el (table--point-entered-cell-function) diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index b12c21b6730..f20015fd720 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el @@ -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) -- 2.39.2