aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus2010-07-29 15:13:11 +0200
committerMichael Albinus2010-07-29 15:13:11 +0200
commit683cc385a444ea49fc75f67e11c12315676972bc (patch)
tree7b0e3e09fdbbd44eddd8804c01611d866b7ce283 /lisp/net
parent8848b728cd609b4ed2667efc0d7eadf3595c8bf0 (diff)
downloademacs-683cc385a444ea49fc75f67e11c12315676972bc.tar.gz
emacs-683cc385a444ea49fc75f67e11c12315676972bc.zip
* net/tramp.el (tramp-handle-start-file-process): Check only for
`remote-tty' process property. (tramp-open-shell): Don't check for tty. (tramp-open-connection-setup-interactive-shell): Set `remote-tty' process property. * progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote host.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6256c8c631d..aca0238e5b6 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4538,14 +4538,12 @@ beginning of local filename are not substituted."
4538 (with-current-buffer (tramp-get-connection-buffer v) 4538 (with-current-buffer (tramp-get-connection-buffer v)
4539 (clear-visited-file-modtime) 4539 (clear-visited-file-modtime)
4540 (narrow-to-region (point-max) (point-max))) 4540 (narrow-to-region (point-max) (point-max)))
4541 (if (stringp program) 4541 (if command
4542 ;; Send the command. `tramp-send-command' opens a new 4542 ;; Send the command.
4543 ;; connection.
4544 (tramp-send-command v command nil t) ; nooutput 4543 (tramp-send-command v command nil t) ; nooutput
4545 ;; Check, whether a pty is associated, and set it as 4544 ;; Check, whether a pty is associated.
4546 ;; process property. 4545 (tramp-maybe-open-connection v)
4547 (condition-case nil 4546 (unless (process-get (tramp-get-connection-process v) 'remote-tty)
4548 (tramp-send-command-and-read v "echo \\\"`tty`\\\"")
4549 (tramp-error 4547 (tramp-error
4550 v 'file-error "pty association is not supported for `%s'" name))) 4548 v 'file-error "pty association is not supported for `%s'" name)))
4551 ;; Set query flag for this process. 4549 ;; Set query flag for this process.
@@ -6631,10 +6629,7 @@ file exists and nonzero exit status otherwise."
6631 vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t) 6629 vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t)
6632 (tramp-send-command vec "PS2=''" t) 6630 (tramp-send-command vec "PS2=''" t)
6633 (tramp-send-command vec "PS3=''" t) 6631 (tramp-send-command vec "PS3=''" t)
6634 (tramp-send-command vec "PROMPT_COMMAND=''" t) 6632 (tramp-send-command vec "PROMPT_COMMAND=''" t)))
6635 ;; Dump tty in the traces.
6636 (when (>= tramp-verbose 9)
6637 (tramp-send-command vec "tty" t))))
6638 6633
6639(defun tramp-find-shell (vec) 6634(defun tramp-find-shell (vec)
6640 "Opens a shell on the remote host which groks tilde expansion." 6635 "Opens a shell on the remote host which groks tilde expansion."
@@ -7071,6 +7066,11 @@ process to set up. VEC specifies the connection."
7071 (when (string-match "^IRIX64" (tramp-get-connection-property vec "uname" "")) 7066 (when (string-match "^IRIX64" (tramp-get-connection-property vec "uname" ""))
7072 (tramp-send-command vec "set +H" t)) 7067 (tramp-send-command vec "set +H" t))
7073 7068
7069 ;; Set `remote-tty' process property.
7070 (ignore-errors
7071 (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"")))
7072 (unless (zerop (length tty)) (process-put proc 'remote-tty tty))))
7073
7074 ;; Set the environment. 7074 ;; Set the environment.
7075 (tramp-message vec 5 "Setting default environment") 7075 (tramp-message vec 5 "Setting default environment")
7076 7076