bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#29156: 25.3; eshell/kill does not understand -<signal>, [PATCH] Make


From: Noam Postavsky
Subject: bug#29156: 25.3; eshell/kill does not understand -<signal>, [PATCH] Make eshell/kill handle -<signal> and -<SIGNALNAME>
Date: Fri, 16 Mar 2018 20:34:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

> From: Eric Skoglund <eric@pagefault.se>

> First time contributor. Here's a patch that allows eshell/kill to handle
> both the -9 case and the -SIGKILL case.

Thanks!

>      * lisp/eshell/esh-proc.el: Handle -<signal> and -<SIGNALNAME>

Minor formatting nitpick, you should have the function name here:

    * lisp/eshell/esh-proc.el (eshell-kill): ...

More importantly, could you explain a bit how your change works/why it's
correct?

>           ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg)
> -          (setq signum (abs (string-to-number arg)))))
> +          (setq signum (make-symbol (substring arg 1 (length arg))))))

Not sure this `make-symbol' call, should it rather be `intern'?  (Maybe
we should update signal-process take a string as well a symbol.)

>          (setq args (cdr args))))
>      (while args
>        (let ((arg (if (eshell-processp (car args))
>                       (process-id (car args))
> -                   (car args))))
> +                   (string-to-number (car args)))))

I think the args have already been converted to numbers, or did you mean
to also add a (put 'eshell/kill 'eshell-no-numeric-conversions t)?





reply via email to

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