Philipp Stephani <p.stepha...@gmail.com> writes: Hi Philipp,
> Almost, but one case is still missing. Try: > > emacs -Q -batch -eval '(progn (require (quote tramp)) (let ((proc > (start-process "sleep" nil "sleep" "60"))) (signal-process (number-to-string > (process-id proc)) (quote ABRT))))' > > This will fail even with the patch. > `signal-process' accepts a process ID converted to a string. This doesn't > seem to be documented, but is necessary for interactive use because > `signal-process' uses `read-string' to read its first argument interactively. Yes. What about the modified patch? Best regards, Michael.
diff --git a/lisp/tramp.el b/lisp/tramp.el index 8a5c9617..5b1a4f84 100644 --- a/lisp/tramp.el +++ b/lisp/tramp.el @@ -6729,6 +6729,11 @@ If PROCESS is a process object which contains the property PROCESS is interpreted as process on the respective remote host, which will be the process to signal. SIGCODE may be an integer, or a symbol whose name is a signal name." + (when (stringp process) + (setq process (or (get-process process) + (and (string-match-p (rx bol (+ digit) eol) process) + (string-to-number process)) + (signal 'wrong-type-argument (list #'processp process))))) (let (pid vec) (cond ((processp process)