summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-smb.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-03-29 19:36:28 +0200
committerMichael Albinus <michael.albinus@gmx.de>2022-03-29 19:36:28 +0200
commit973608e35895a8f89a3abcac43dfaf89598b0c82 (patch)
tree769a3f85dd5135df0ca7b8095a1428490281ae27 /lisp/net/tramp-smb.el
parentfbf2ed9a648d9c0f64519900acf1574d0d74692b (diff)
downloademacs-973608e35895a8f89a3abcac43dfaf89598b0c82.tar.gz
emacs-973608e35895a8f89a3abcac43dfaf89598b0c82.tar.bz2
emacs-973608e35895a8f89a3abcac43dfaf89598b0c82.zip
Handle process property `remote-command' in Tramp
* doc/misc/tramp.texi (Remote processes): New subsection "Process properties of asynchronous remote processes". * lisp/net/tramp.el (tramp-handle-make-process): * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) Set `remote-command' process property. (tramp-scp-direct-remote-copying): Rename connection property. * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test31-interrupt-process) (tramp--test-async-shell-command): Check process property `remote-command'.
Diffstat (limited to 'lisp/net/tramp-smb.el')
-rw-r--r--lisp/net/tramp-smb.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index bbc5499ae72..db6b0fc174d 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1544,7 +1544,8 @@ component is used as the target of the symlink."
(command (string-join (cons program args) " "))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
- (i 0))
+ (i 0)
+ p)
(unwind-protect
(save-excursion
(save-restriction
@@ -1567,8 +1568,13 @@ component is used as the target of the symlink."
host (file-name-directory localname))))
(tramp-message v 6 "(%s); exit" command)
(tramp-send-string v command)))
+ (setq p (tramp-get-connection-process v))
+ (when program
+ (process-put p 'remote-command (cons program args))
+ (tramp-set-connection-property
+ p "remote-command" (cons program args)))
;; Return value.
- (tramp-get-connection-process v)))
+ p))
;; Save exit.
(with-current-buffer (tramp-get-connection-buffer v)