]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/tramp.el (tramp-action-process-alive): Read pending output.
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 11 Apr 2020 07:08:54 +0000 (09:08 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 11 Apr 2020 07:08:54 +0000 (09:08 +0200)
lisp/net/tramp.el

index e30f27fd338888601fa673f57c853d5892781318..a16085d7fb097a4638796d87eec9a5fb9fa78e64 100644 (file)
@@ -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)