]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use the Lisp implementation of "kill" in remote Eshell directories
authorJim Porter <jporterbugs@gmail.com>
Wed, 10 Jul 2024 00:19:26 +0000 (17:19 -0700)
committerEshel Yaron <me@eshelyaron.com>
Wed, 10 Jul 2024 20:00:20 +0000 (22:00 +0200)
* 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

index a5e9de7990705ba7fb7fa2fc4fe11bba4d3856aa..f982e2101f5b6bfef9e1203b7f4eba5d2d7bbc9c 100644 (file)
@@ -206,6 +206,11 @@ This is like `process-live-p', but additionally checks whether
 Usage: kill [-<signal>] <pid>|<process> ...
 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))