aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus2010-08-06 16:34:23 +0200
committerMichael Albinus2010-08-06 16:34:23 +0200
commitd00fa9b65e158e77c05cd0d64c2e3e4107de2080 (patch)
treef415cad0ad9bf49948dc1699a7d7f1d5e586a0e0 /lisp/net
parent942415f397bd75cdc9eaf567a29cb64b96eecc5e (diff)
downloademacs-d00fa9b65e158e77c05cd0d64c2e3e4107de2080.tar.gz
emacs-d00fa9b65e158e77c05cd0d64c2e3e4107de2080.zip
* net/tramp.el (tramp-handle-start-file-process ): Set connection
property "vec". (tramp-process-sentinel): Use it for flushing the cache. We cannot do it via the process buffer, the buffer could be deleted already when running the sentinel.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 65713580b1b..a9870823f80 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4506,10 +4506,10 @@ beginning of local filename are not substituted."
4506(defun tramp-process-sentinel (proc event) 4506(defun tramp-process-sentinel (proc event)
4507 "Flush file caches." 4507 "Flush file caches."
4508 (unless (memq (process-status proc) '(run open)) 4508 (unless (memq (process-status proc) '(run open))
4509 (with-current-buffer (process-buffer proc) 4509 (let ((vec (tramp-get-connection-property proc "vector" nil)))
4510 (with-parsed-tramp-file-name default-directory nil 4510 (when vec
4511 (tramp-message v 5 "Sentinel called: `%s' `%s'" proc event) 4511 (tramp-message vec 5 "Sentinel called: `%s' `%s'" proc event)
4512 (tramp-flush-directory-property v ""))))) 4512 (tramp-flush-directory-property vec "")))))
4513 4513
4514;; We use BUFFER also as connection buffer during setup. Because of 4514;; We use BUFFER also as connection buffer during setup. Because of
4515;; this, its original contents must be saved, and restored once 4515;; this, its original contents must be saved, and restored once
@@ -4556,6 +4556,7 @@ beginning of local filename are not substituted."
4556 v 'file-error "pty association is not supported for `%s'" name))) 4556 v 'file-error "pty association is not supported for `%s'" name)))
4557 (let ((p (tramp-get-connection-process v))) 4557 (let ((p (tramp-get-connection-process v)))
4558 ;; Set sentinel and query flag for this process. 4558 ;; Set sentinel and query flag for this process.
4559 (tramp-set-connection-property p "vector" v)
4559 (set-process-sentinel p 'tramp-process-sentinel) 4560 (set-process-sentinel p 'tramp-process-sentinel)
4560 (tramp-set-process-query-on-exit-flag p t) 4561 (tramp-set-process-query-on-exit-flag p t)
4561 ;; Return process. 4562 ;; Return process.