Function: tramp-process-sentinel

tramp-process-sentinel is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-process-sentinel PROC EVENT)

Documentation

Flush file caches and remove shell prompt.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-process-sentinel (proc event)
  "Flush file caches and remove shell prompt."
  (unless (process-live-p proc)
    (let ((vec (process-get proc 'tramp-vector))
	  (buf (process-buffer proc))
	  (prompt (tramp-get-connection-property proc "prompt")))
      (when vec
	(tramp-message vec 5 "Sentinel called: `%S' `%s'" proc event)
        (tramp-flush-connection-properties proc)
        (tramp-flush-directory-properties vec "/"))
      (when (buffer-live-p buf)
	(with-current-buffer buf
          (when (and prompt
		     (tramp-search-regexp (tramp-compat-rx (literal prompt))))
	    (delete-region (point) (point-max))))))))