From: Jim Porter Date: Sun, 14 Jul 2024 23:51:43 +0000 (-0700) Subject: Use 'kill-process' as a fallback when a pipe gets broken in Eshell X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~613^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=469bc7c96868e3cd31e03603366f32b88070f887;p=emacs.git Use 'kill-process' as a fallback when a pipe gets broken in Eshell This is better than 'delete-process' since it will ensure that any stderr pipe-processes get stopped as well (bug#72117). * lisp/eshell/esh-proc.el (eshell-insertion-filter): Use 'kill-process' instead of 'delete-process'. --- diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 2ff41c3d409..f3a099885bb 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -483,7 +483,7 @@ output." ;; here. However, remote processes don't currently ;; support that, and not all systems have SIGPIPE in ;; the first place (e.g. MS Windows). In these - ;; cases, just delete the process; this is + ;; cases, just kill the process; this is ;; reasonably close to the right behavior, since the ;; default action for SIGPIPE is to terminate the ;; process. For use cases where SIGPIPE is truly @@ -493,7 +493,7 @@ output." (eshell-pipe-broken (if (or (process-get proc 'remote-pid) (eq system-type 'windows-nt)) - (delete-process proc) + (kill-process proc) (signal-process proc 'SIGPIPE)))))) (process-put proc :eshell-busy nil))))))