]> git.eshelyaron.com Git - emacs.git/commitdiff
Ignore 'eshell-broken-pipe' error in 'eshell-sentinel'
authorJim Porter <jporterbugs@gmail.com>
Mon, 21 Feb 2022 20:14:34 +0000 (12:14 -0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 23 Feb 2022 12:13:45 +0000 (13:13 +0100)
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

index ed37de85f7a422c23a590911768dbc4bf0d8cdfd..d7d22d2a9ef84d2c572499dfafd1f9928c79df20 100644 (file)
@@ -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)))))