mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 11:50:51 -08:00
Improve connection type `pipe' for remote processes
* doc/misc/tramp.texi (Remote processes): New subsection "Remote process connection type". * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): Use `tramp-process-connection-type' as default connection type. Improve check for `:connection-type'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Use `tramp-process-connection-type' as default connection type. Improve check for `:connection-type'. Send "stty -icrnl" when connection type is a pipe. * lisp/net/tramp.el (tramp-process-connection-type): Allow all possible values. (tramp-handle-make-process): Use `tramp-process-connection-type' as default connection type. Improve check for `:connection-type'. * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Extend test.
This commit is contained in:
parent
5809728bc5
commit
5d50acd0a6
5 changed files with 85 additions and 9 deletions
|
|
@ -2752,7 +2752,10 @@ implementation will be used."
|
|||
(command (plist-get args :command))
|
||||
(coding (plist-get args :coding))
|
||||
(noquery (plist-get args :noquery))
|
||||
(connection-type (plist-get args :connection-type))
|
||||
(connection-type
|
||||
(if (plist-member args :connection-type)
|
||||
(plist-get args :connection-type)
|
||||
tramp-process-connection-type))
|
||||
(filter (plist-get args :filter))
|
||||
(sentinel (plist-get args :sentinel))
|
||||
(stderr (plist-get args :stderr)))
|
||||
|
|
@ -2768,7 +2771,7 @@ implementation will be used."
|
|||
(memq (car coding) coding-system-list)
|
||||
(memq (cdr coding) coding-system-list)))
|
||||
(signal 'wrong-type-argument (list #'symbolp coding)))
|
||||
(unless (or (null connection-type) (memq connection-type '(pipe pty)))
|
||||
(unless (memq connection-type '(nil pipe t pty))
|
||||
(signal 'wrong-type-argument (list #'symbolp connection-type)))
|
||||
(unless (or (null filter) (functionp filter))
|
||||
(signal 'wrong-type-argument (list #'functionp filter)))
|
||||
|
|
@ -2916,6 +2919,9 @@ implementation will be used."
|
|||
(setq p (tramp-get-connection-process v))
|
||||
(process-put p 'remote-pid pid)
|
||||
(tramp-set-connection-property p "remote-pid" pid))
|
||||
;; Disable carriage return to newline translation.
|
||||
(when (memq connection-type '(nil pipe))
|
||||
(tramp-send-command v "stty -icrnl"))
|
||||
;; `tramp-maybe-open-connection' and
|
||||
;; `tramp-send-command-and-read' could have
|
||||
;; trashed the connection buffer. Remove this.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue