diff options
| author | Michael Albinus | 2020-02-13 16:34:07 +0100 |
|---|---|---|
| committer | Michael Albinus | 2020-02-13 16:34:07 +0100 |
| commit | 7fda39419296cda9ae1c01c8ca69a30775db68b0 (patch) | |
| tree | 1026d657385abb6ab76e634c8d21a3484e01cc12 /lisp | |
| parent | de1d150a6ef58760ab0a58dbee84596623d85d14 (diff) | |
| download | emacs-7fda39419296cda9ae1c01c8ca69a30775db68b0.tar.gz emacs-7fda39419296cda9ae1c01c8ca69a30775db68b0.zip | |
Fix `tramp-interrupt-process'
* lisp/net/tramp.el (tramp-interrupt-process): Improve command.
* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name)
(tramp-test26-file-name-completion): Simplify.
(tramp-test31-interrupt-process): Remove :unstable tag.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/net/tramp.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6928df4fa60..409e1f7499a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -5006,10 +5006,12 @@ name of a process or buffer, or nil to default to the current buffer." | |||
| 5006 | (tramp-error proc 'error "Process %s is not active" proc) | 5006 | (tramp-error proc 'error "Process %s is not active" proc) |
| 5007 | (tramp-message proc 5 "Interrupt process %s with pid %s" proc pid) | 5007 | (tramp-message proc 5 "Interrupt process %s with pid %s" proc pid) |
| 5008 | ;; This is for tramp-sh.el. Other backends do not support this (yet). | 5008 | ;; This is for tramp-sh.el. Other backends do not support this (yet). |
| 5009 | ;; Not all "kill" implementations support process groups by | ||
| 5010 | ;; negative pid, so we try both variants. | ||
| 5009 | (tramp-compat-funcall | 5011 | (tramp-compat-funcall |
| 5010 | 'tramp-send-command | 5012 | 'tramp-send-command |
| 5011 | (process-get proc 'vector) | 5013 | (process-get proc 'vector) |
| 5012 | (format "kill -2 -%d" pid)) | 5014 | (format "(\\kill -2 -%d || \\kill -2 %d) 2>/dev/null" pid pid)) |
| 5013 | ;; Wait, until the process has disappeared. If it doesn't, | 5015 | ;; Wait, until the process has disappeared. If it doesn't, |
| 5014 | ;; fall back to the default implementation. | 5016 | ;; fall back to the default implementation. |
| 5015 | (while (tramp-accept-process-output proc 0)) | 5017 | (while (tramp-accept-process-output proc 0)) |
| @@ -5064,10 +5066,5 @@ name of a process or buffer, or nil to default to the current buffer." | |||
| 5064 | ;; and friends, for most of the handlers this is the major | 5066 | ;; and friends, for most of the handlers this is the major |
| 5065 | ;; difference between the different backends. Other handlers but | 5067 | ;; difference between the different backends. Other handlers but |
| 5066 | ;; *-process-file would profit from this as well. | 5068 | ;; *-process-file would profit from this as well. |
| 5067 | ;; | ||
| 5068 | ;; * Get rid of `shell-command'. In its primary implementation, it | ||
| 5069 | ;; uses `process-file-shell-command' and | ||
| 5070 | ;; `start-file-process-shell-command', which is sufficient due to | ||
| 5071 | ;; connection-local `shell-file-name'. | ||
| 5072 | 5069 | ||
| 5073 | ;;; tramp.el ends here | 5070 | ;;; tramp.el ends here |