mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-02 20:16:25 +00:00
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.
This commit is contained in:
parent
7d71d0b13d
commit
38a86a4c49
@ -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))
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user