Commit c2c9ef2c authored by Michael Albinus's avatar Michael Albinus

Fix error in tramp-sh.el

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Revert "simplification", which was an error.
parent 181e0c09
Pipeline #1269 failed with stage
in 42 minutes and 26 seconds
...@@ -2903,7 +2903,8 @@ the result will be a local, non-Tramp, file name." ...@@ -2903,7 +2903,8 @@ the result will be a local, non-Tramp, file name."
;; otherwise we might be interrupted by ;; otherwise we might be interrupted by
;; `verify-visited-file-modtime'. ;; `verify-visited-file-modtime'.
(let ((buffer-undo-list t) (let ((buffer-undo-list t)
(inhibit-read-only t)) (inhibit-read-only t)
(mark (point-max)))
(clear-visited-file-modtime) (clear-visited-file-modtime)
(narrow-to-region (point-max) (point-max)) (narrow-to-region (point-max) (point-max))
;; We call `tramp-maybe-open-connection', in ;; We call `tramp-maybe-open-connection', in
...@@ -2916,7 +2917,12 @@ the result will be a local, non-Tramp, file name." ...@@ -2916,7 +2917,12 @@ the result will be a local, non-Tramp, file name."
(let ((pid (tramp-send-command-and-read v "echo $$"))) (let ((pid (tramp-send-command-and-read v "echo $$")))
(process-put p 'remote-pid pid) (process-put p 'remote-pid pid)
(tramp-set-connection-property p "remote-pid" pid)) (tramp-set-connection-property p "remote-pid" pid))
(delete-region (point-min) (point-max)) ;; `tramp-maybe-open-connection' and
;; `tramp-send-command-and-read' could have
;; trashed the connection buffer. Remove this.
(widen)
(delete-region mark (point-max))
(narrow-to-region (point-max) (point-max))
;; Now do it. ;; Now do it.
(if command (if command
;; Send the command. ;; Send the command.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment