emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 6a6e8e6: Make tramp-interrupt-process more robust


From: Michael Albinus
Subject: [Emacs-diffs] emacs-26 6a6e8e6: Make tramp-interrupt-process more robust
Date: Mon, 11 Dec 2017 03:36:34 -0500 (EST)

branch: emacs-26
commit 6a6e8e6e8d56fb8c4798ccfbabdf1f34d8857692
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Make tramp-interrupt-process more robust
    
    * lisp/net/tramp.el (tramp-interrupt-process): Fall back to
    the default implementation if there's no success.
---
 lisp/net/tramp.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2fdc651..1695eea 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4570,14 +4570,14 @@ Only works for Bourne-like shells."
         'tramp-send-command
         (tramp-get-connection-property proc "vector" nil)
         (format "kill -2 %d" pid))
-       ;; Wait, until the process has disappeared.
-       (with-timeout
-           (1 (tramp-error proc 'error "Process %s did not interrupt" proc))
+       ;; Wait, until the process has disappeared.  If it doesn't,
+       ;; fall back to the default implementation.
+       (with-timeout (1 (ignore))
          (while (process-live-p proc)
            ;; We cannot run `tramp-accept-process-output', it blocks timers.
-           (accept-process-output proc 0.1)))
-       ;; Report success.
-       proc))))
+           (accept-process-output proc 0.1))
+         ;; Report success.
+         proc)))))
 
 ;; `interrupt-process-functions' exists since Emacs 26.1.
 (when (boundp 'interrupt-process-functions)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]