]> git.eshelyaron.com Git - emacs.git/commitdiff
Make tramp-interrupt-process more robust
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 11 Dec 2017 08:36:23 +0000 (09:36 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 11 Dec 2017 08:36:23 +0000 (09:36 +0100)
* lisp/net/tramp.el (tramp-interrupt-process): Fall back to
the default implementation if there's no success.

lisp/net/tramp.el

index 2fdc651a37283112cfa981d20b45620624f8a57b..1695eea06ccfd23bca20f77f9260e33002b8b726 100644 (file)
@@ -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)