aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2010-07-29 15:13:11 +0200
committerMichael Albinus2010-07-29 15:13:11 +0200
commit683cc385a444ea49fc75f67e11c12315676972bc (patch)
tree7b0e3e09fdbbd44eddd8804c01611d866b7ce283
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.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/net/tramp.el22
-rw-r--r--lisp/progmodes/gdb-mi.el5
3 files changed, 26 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4beafc1caaa..49dcafca9da 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
12010-07-29 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-handle-start-file-process): Check only for
4 `remote-tty' process property.
5 (tramp-open-shell): Don't check for tty.
6 (tramp-open-connection-setup-interactive-shell): Set `remote-tty'
7 process property.
8
9 * progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote
10 host.
11
12010-07-28 Chong Yidong <cyd@stupidchicken.com> 122010-07-28 Chong Yidong <cyd@stupidchicken.com>
2 13
3 * emacs-lisp/package.el (package-load-list, package-archives) 14 * emacs-lisp/package.el (package-load-list, package-archives)
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
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index e4cc32b972c..5b98ff427c3 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -795,7 +795,10 @@ detailed description of this mode.
795 (gdb-input 795 (gdb-input
796 ;; Needs GDB 6.4 onwards 796 ;; Needs GDB 6.4 onwards
797 (list (concat "-inferior-tty-set " 797 (list (concat "-inferior-tty-set "
798 (process-tty-name (get-process "gdb-inferior"))) 798 (or
799 ;; The process can run on a remote host.
800 (process-get (get-process "gdb-inferior") 'remote-tty)
801 (process-tty-name (get-process "gdb-inferior"))))
799 'ignore)) 802 'ignore))
800 (if (eq window-system 'w32) 803 (if (eq window-system 'w32)
801 (gdb-input (list "-gdb-set new-console off" 'ignore))) 804 (gdb-input (list "-gdb-set new-console off" 'ignore)))