Improve tramp-interrupt-process robustness
* lisp/net/tramp.el (tramp-interrupt-process): Wait, until the process has disappeared.
This commit is contained in:
parent
8d4223e61b
commit
9e1b5bd92c
1 changed files with 6 additions and 0 deletions
|
@ -4556,6 +4556,12 @@ Only works for Bourne-like shells."
|
||||||
'tramp-send-command
|
'tramp-send-command
|
||||||
(tramp-get-connection-property proc "vector" nil)
|
(tramp-get-connection-property proc "vector" nil)
|
||||||
(format "kill -2 %d" pid))
|
(format "kill -2 %d" pid))
|
||||||
|
;; Wait, until the process has disappeared.
|
||||||
|
(with-timeout
|
||||||
|
(1 (tramp-error proc 'error "Process %s did not interrupt" proc))
|
||||||
|
(while (process-live-p proc)
|
||||||
|
;; We cannot run `tramp-accept-process-output', it blocks timers.
|
||||||
|
(accept-process-output proc 0.1)))
|
||||||
;; Report success.
|
;; Report success.
|
||||||
proc))))
|
proc))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue