From f41b9e2599fe3a1a959ef1b52f77032fd8d28c20 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Mon, 21 Feb 2022 12:14:34 -0800 Subject: [PATCH] Ignore 'eshell-broken-pipe' error in 'eshell-sentinel' This can happen if 'eshell-sentinel' tries to write output to another process, but that process has already terminated. * lisp/eshell/esh-proc.el (eshell-sentinel): Use 'ignore-error' instead of 'unwind-protect'. --- lisp/eshell/esh-proc.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index ed37de85f7..d7d22d2a9e 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -435,12 +435,12 @@ eshell-sentinel (lambda () (if (nth 4 entry) (run-at-time 0 nil finish-io) - (unwind-protect - (when str - (eshell-output-object - str nil handles)) - (eshell-close-handles - status 'nil handles)))))) + (when str + (ignore-error 'eshell-pipe-broken + (eshell-output-object + str nil handles))) + (eshell-close-handles + status 'nil handles))))) (funcall finish-io))))) (eshell-remove-process-entry entry)))) (eshell-kill-process-function proc string))))) -- 2.25.1