From: Michael Albinus Date: Sat, 11 Apr 2020 07:08:54 +0000 (+0200) Subject: * lisp/net/tramp.el (tramp-action-process-alive): Read pending output. X-Git-Tag: emacs-28.0.90~7619 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aa072db86b6b06b54d7f5846231bdf4a73b0cd84;p=emacs.git * lisp/net/tramp.el (tramp-action-process-alive): Read pending output. --- diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index e30f27fd338..a16085d7fb0 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4074,6 +4074,8 @@ The terminal type can be configured with `tramp-terminal-type'." (defun tramp-action-process-alive (proc _vec) "Check, whether a process has finished." (unless (process-live-p proc) + ;; There might be pending output. + (while (tramp-accept-process-output proc 0)) (throw 'tramp-action 'process-died))) (defun tramp-action-out-of-band (proc vec)