aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2009-11-29 20:05:23 +0000
committerMichael Albinus2009-11-29 20:05:23 +0000
commite2a421af398d805b37e957ac2166929d65fa8c4b (patch)
treed34fe0637698e1fb4cc004fdb1cf7a461e1e9c5b
parentf06dbf7ea981c278f2fd5cd7ab78edc40d085e1e (diff)
downloademacs-e2a421af398d805b37e957ac2166929d65fa8c4b.tar.gz
emacs-e2a421af398d805b37e957ac2166929d65fa8c4b.zip
* net/tramp.el (tramp-maybe-open-connection): Open the remote
shell with "exec" when possible. This prevents trailing prompts in `start-file-process'.
-rw-r--r--lisp/net/tramp.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 795c7eefc38..678c8cc22e0 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -7227,6 +7227,9 @@ connection if a previous connection has died for some reason."
7227 (?t . ,tmpfile)) 7227 (?t . ,tmpfile))
7228 command 7228 command
7229 (concat 7229 (concat
7230 ;; We do not want to see the trailing local prompt in
7231 ;; `start-file-process'.
7232 (unless (memq system-type '(windows-nt)) "exec ")
7230 command " " 7233 command " "
7231 (mapconcat 7234 (mapconcat
7232 (lambda (x) 7235 (lambda (x)
@@ -7236,7 +7239,7 @@ connection if a previous connection has died for some reason."
7236 ;; Local shell could be a Windows COMSPEC. It doesn't 7239 ;; Local shell could be a Windows COMSPEC. It doesn't
7237 ;; know the ";" syntax, but we must exit always for 7240 ;; know the ";" syntax, but we must exit always for
7238 ;; `start-file-process'. "exec" does not work either. 7241 ;; `start-file-process'. "exec" does not work either.
7239 " && exit || exit")) 7242 (if (memq system-type '(windows-nt)) " && exit || exit")))
7240 7243
7241 ;; Send the command. 7244 ;; Send the command.
7242 (tramp-message vec 3 "Sending command `%s'" command) 7245 (tramp-message vec 3 "Sending command `%s'" command)