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

From: Noam Postavsky <[email-masked]>
Date: Fri, 16 Mar 2018 20:21:46 -0400

[forwarding to list]

Subject: Re: bug#29156: 25.3; eshell/kill does not understand -<signal>
From: Eric Skoglund <[email-masked]>
To: Noam Postavsky <[email-masked]>
Date: Fri, 16 Mar 2018 15:01:32 +0100

--=-=-=
Content-Type: text/plain

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

--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=0001-Make-eshell-kill-handle-signal-and-SIGNALNAME.patch
Content-Description: eshell/kill patch

>From 2789c82b27cfac175d6d04260db78a54a2f26b01 Mon Sep 17 00:00:00 2001
From: Eric Skoglund <[email-masked]>
Date: Fri, 16 Mar 2018 14:49:56 +0100
Subject: [PATCH] Make eshell/kill handle -<signal> and -<SIGNALNAME>

     * lisp/eshell/esh-proc.el: Handle -<signal> and -<SIGNALNAME>
---
 lisp/eshell/esh-proc.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index b3bd7a7245..6dab6636b0 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -178,12 +178,12 @@ eshell/kill
          ((string-match "\\`-[[:digit:]]+\\'" arg)
           (setq signum (abs (string-to-number arg))))
          ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg)
-          (setq signum (abs (string-to-number arg)))))
+          (setq signum (make-symbol (substring arg 1 (length arg))))))
         (setq args (cdr args))))
     (while args
       (let ((arg (if (eshell-processp (car args))
                      (process-id (car args))
-                   (car args))))
+                   (string-to-number (car args)))))
         (when arg
           (cond
            ((null arg)
-- 
2.13.6

--=-=-=--