summaryrefslogtreecommitdiff
path: root/lisp/net/tramp.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-11-21 14:49:54 +0100
committerMichael Albinus <michael.albinus@gmx.de>2022-11-21 14:49:54 +0100
commit61e96789ddb1fe81520c3b1cc6c7ff43da5bc26f (patch)
tree037f438720579fedeac84cda0ab0fc0ca7675919 /lisp/net/tramp.el
parenta3b654e069e563b0a2a6335ec310ada51400ac09 (diff)
downloademacs-61e96789ddb1fe81520c3b1cc6c7ff43da5bc26f.tar.gz
Activate direct asynchronous processes for Tramp container methods
* doc/misc/tramp.texi (Remote processes): Mention also tramp-container.el. * lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Add `tramp-direct-async' to "mock" method. * lisp/net/tramp-container.el (tramp-methods) <docker, podman, kubernetes>: Add `tramp-direct-async'. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-handle-make-process): Handle `tramp-direct-async'. * test/lisp/net/tramp-tests.el (tramp-methods) <mock>: Add `tramp-direct-async'.
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r--lisp/net/tramp.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index b08bc63e8a2..e9f30bea7bf 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -278,8 +278,9 @@ pair of the form (KEY VALUE). The following KEYs are defined:
* `tramp-direct-async'
Whether the method supports direct asynchronous processes.
- Until now, just \"ssh\"-based, \"sshfs\"-based and
- \"adb\"-based methods do.
+ Until now, just \"ssh\"-based, \"sshfs\"-based, \"adb\"-based
+ and container methods do. If it is a list of strings, they
+ are used to construct the remote command.
* `tramp-config-check'
A function to be called with one argument, VEC. It should
@@ -4804,7 +4805,14 @@ substitution. SPEC-LIST is a list of char/value pairs used for
(command
(append
`("cd" ,(tramp-shell-quote-argument localname) "&&" "(" "env")
- env `(,command ")"))))
+ env `(,command ")")))
+ ;; Add remote shell if needed.
+ (command
+ (if (consp (tramp-get-method-parameter v 'tramp-direct-async))
+ (append
+ (tramp-get-method-parameter v 'tramp-direct-async)
+ `(,(mapconcat #'identity command " ")))
+ command)))
;; Check for `tramp-sh-file-name-handler', because something
;; is different between tramp-sh.el, and tramp-adb.el or