From cc188c56e0b4313e55af60683f2d1cf9c7f00e1b Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sun, 14 Jul 2024 16:51:43 -0700 Subject: [PATCH] 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'. --- lisp/eshell/esh-proc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 0dcdf3bb76c..cb57bb305cc 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -519,7 +519,7 @@ eshell-insertion-filter ;; 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 @@ -529,7 +529,7 @@ eshell-insertion-filter (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)))))) -- 2.25.1