Mercurial > emacs
changeset 81106:f4d5f1a40875
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 <mwolson@gnu.org>
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 30 May 2007 14:06:39 +0000 |
parents | 1f40aca3eadc |
children | a9d423c1c1d4 4c726a40604c 648e6c714c7d |
files | lisp/ChangeLog lisp/emacs-lisp/tq.el |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed May 30 05:24:18 2007 +0000 +++ b/lisp/ChangeLog Wed May 30 14:06:39 2007 +0000 @@ -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)
--- a/lisp/emacs-lisp/tq.el Wed May 30 05:24:18 2007 +0000 +++ b/lisp/emacs-lisp/tq.el Wed May 30 14:06:39 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)