From 1de768821e5cf76c85821f4a57b5537783377368 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Tue, 9 Jul 2024 17:19:26 -0700 Subject: [PATCH] Don't use the Lisp implementation of "kill" in remote Eshell directories * lisp/eshell/esh-proc.el (eshell/kill): When in a remote directory, fall back to the external "kill" program (bug#72013). (cherry picked from commit 342998511add79c594a170dc04ecda2f2db0fd36) --- lisp/eshell/esh-proc.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index a5e9de79907..f982e2101f5 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -206,6 +206,11 @@ This is like `process-live-p', but additionally checks whether Usage: kill [-] | ... Accepts PIDs and process objects. Optionally accept signals and signal names." + ;; The implementation below only supports local PIDs. For remote + ;; connections, fall back to the external "kill" command. + (when (file-remote-p default-directory) + (declare-function eshell-external-command "esh-ext" (command args)) + (throw 'eshell-external (eshell-external-command "kill" args))) ;; If the first argument starts with a dash, treat it as the signal ;; specifier. (let ((signum 'SIGINT)) -- 2.39.2