summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-sudoedit.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2019-01-16 13:56:38 +0100
committerMichael Albinus <michael.albinus@gmx.de>2019-01-16 13:56:38 +0100
commitb2497ef6952134022ad799247bc5a31f7559ef87 (patch)
tree26deb5515152f01559c3eb971d4d28d61bac6174 /lisp/net/tramp-sudoedit.el
parent02976d67369699660add46d548f0d1593885334b (diff)
downloademacs-b2497ef6952134022ad799247bc5a31f7559ef87.tar.gz
Some accept-process-output cleanups in Tramp
* lisp/net/tramp.el (tramp-action-out-of-band): Read process output in a loop. (tramp-accept-process-output): Return result. (tramp-interrupt-process): * lisp/net/tramp-adb.el (tramp-adb-parse-device-names): * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names): Remove FIXME. * lisp/net/tramp-sh.el (tramp-local-coding-commands): Fix docstring. * lisp/net/tramp-smb.el (tramp-smb-wait-for-output): Adapt docstring. Simplify code. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo): Adapt docstring. Read process output in a loop. * test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests): Remove :unstable tag on emba.
Diffstat (limited to 'lisp/net/tramp-sudoedit.el')
-rw-r--r--lisp/net/tramp-sudoedit.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index e1e5ab091a1..ff3a7d79132 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -744,11 +744,10 @@ ID-FORMAT valid values are `string' and `integer'."
;; Used in `tramp-sudoedit-sudo-actions'.
(defun tramp-sudoedit-action-sudo (proc vec)
- "Check, whether a sudo process copy has finished."
+ "Check, whether a sudo process has finished.
+Remove unneeded output."
;; There might be pending output for the exit status.
- ;; FIXME: Either remove " 0.1", or comment why it's needed.
- ;; FIXME: There's a race here. Shouldn't the next two lines be interchanged?
- (tramp-accept-process-output proc 0.1)
+ (while (tramp-accept-process-output proc 0.1))
(when (not (process-live-p proc))
;; Delete narrowed region, it would be in the way reading a Lisp form.
(goto-char (point-min))