[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 38a86a4: Some changes in process output read of Tra
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 38a86a4: Some changes in process output read of Tramp |
Date: |
Sat, 15 Jun 2019 05:33:24 -0400 (EDT) |
branch: master
commit 38a86a4c490348e74ad1c395ad66176f15d1ce20
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Some changes in process output read of Tramp
* lisp/net/tramp.el (tramp-handle-file-notify-rm-watch):
Read pending output.
* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process):
Use a timeout when reading process output.
---
lisp/net/tramp.el | 2 ++
test/lisp/net/tramp-tests.el | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 76eb03b..5086ceb 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3865,6 +3865,8 @@ of."
;; The descriptor must be a process object.
(unless (processp proc)
(tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc))
+ ;; There might be pending output.
+ (while (tramp-accept-process-output proc 0))
(tramp-message proc 6 "Kill %S" proc)
(delete-process proc))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index b9868ff..c9ae4d8 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -4173,7 +4173,8 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
(should (numberp (process-get proc 'remote-pid)))
(should (interrupt-process proc))
;; Let the process accept the interrupt.
- (while (accept-process-output proc nil nil 0))
+ (with-timeout (10 (tramp--test-timeout-handler))
+ (while (accept-process-output proc nil nil 0)))
(should-not (process-live-p proc))
;; An interrupted process cannot be interrupted, again.
(should-error (interrupt-process proc) :type 'error))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 38a86a4: Some changes in process output read of Tramp,
Michael Albinus <=