emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 76fcfe1eb1: Ignore 'eshell-broken-pipe' error in 'eshell-sentinel


From: Lars Ingebrigtsen
Subject: master 76fcfe1eb1: Ignore 'eshell-broken-pipe' error in 'eshell-sentinel'
Date: Wed, 23 Feb 2022 07:14:40 -0500 (EST)

branch: master
commit 76fcfe1eb1b6b8086cb58966801d2509fd55d9f9
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 @@ PROC is the process that's exiting.  STRING is the exit 
message."
                                   (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)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]