From aa072db86b6b06b54d7f5846231bdf4a73b0cd84 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 11 Apr 2020 09:08:54 +0200 Subject: [PATCH] * lisp/net/tramp.el (tramp-action-process-alive): Read pending output. --- lisp/net/tramp.el | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.39.5