diff options
| author | John Shahid | 2019-05-15 16:29:58 +0200 |
|---|---|---|
| committer | Michael Albinus | 2019-05-15 16:29:58 +0200 |
| commit | d0ebc389ebba0ca5b99e019c47c4a616941378ac (patch) | |
| tree | 5a96bd22029a3caa43a6749f7e5fd96e87b42a5f | |
| parent | 356fb18a1f64e58559fef92016be258b8cc70753 (diff) | |
| download | emacs-d0ebc389ebba0ca5b99e019c47c4a616941378ac.tar.gz emacs-d0ebc389ebba0ca5b99e019c47c4a616941378ac.zip | |
Avoid infinitly looping in tramp-interrupt-process (bug#35506)
* lisp/net/tramp.el (tramp-interrupt-process): Remove with-timeout.
Instead pass a timeout to tramp-accept-process-output.
tramp-accept-process-output stops timers from running which makes the
with-timeout ineffective.
| -rw-r--r-- | lisp/net/tramp.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 0a3129fd454..2aa62eba80e 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4861,10 +4861,9 @@ Only works for Bourne-like shells." | |||
| 4861 | (format "kill -2 -%d" pid)) | 4861 | (format "kill -2 -%d" pid)) |
| 4862 | ;; Wait, until the process has disappeared. If it doesn't, | 4862 | ;; Wait, until the process has disappeared. If it doesn't, |
| 4863 | ;; fall back to the default implementation. | 4863 | ;; fall back to the default implementation. |
| 4864 | (with-timeout (1 (ignore)) | 4864 | (and (tramp-accept-process-output proc 1) |
| 4865 | (while (tramp-accept-process-output proc)) | 4865 | ;; Report success. |
| 4866 | ;; Report success. | 4866 | proc))))) |
| 4867 | proc))))) | ||
| 4868 | 4867 | ||
| 4869 | ;; `interrupt-process-functions' exists since Emacs 26.1. | 4868 | ;; `interrupt-process-functions' exists since Emacs 26.1. |
| 4870 | (when (boundp 'interrupt-process-functions) | 4869 | (when (boundp 'interrupt-process-functions) |