From: Christian Ehrhardt
Fixing some confusion of the bash builtin kill not behaving as the procps kill which one can see in the manpages by adding a -L option mapping to the already existing code behind -l. Signed-off-by: Christian Ehrhardt --- [diffstat] builtins/kill.def | 8 ++++---- doc/bashref.html | 6 +++--- doc/bashref.info | 16 ++++++++-------- doc/bashref.texi | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) [diff] === modified file 'builtins/kill.def' --- builtins/kill.def 2014-03-03 22:52:05 +0000 +++ builtins/kill.def 2015-09-30 13:28:20 +0000 @@ -22,7 +22,7 @@ $BUILTIN kill $FUNCTION kill_builtin -$SHORT_DOC kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] +$SHORT_DOC kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l|-L [sigspec] Send a signal to a job. Send the processes identified by PID or JOBSPEC the signal named by @@ -32,8 +32,8 @@ Options: -s sig SIG is a signal name -n sig SIG is a signal number - -l list the signal names; if arguments follow `-l' they are - assumed to be signal numbers for which names should be listed + -l|-L list the signal names; if arguments follow `-l' they are + assumed to be signal numbers for which names should be listed Kill is a shell builtin for two reasons: it allows job IDs to be used instead of process IDs, and allows processes to be killed if the limit @@ -107,7 +107,7 @@ { word = list->word->word; - if (ISOPTION (word, 'l')) + if (ISOPTION (word, 'l') || ISOPTION (word, 'L')) { listing++; list = list->next; === modified file 'doc/bashref.html' --- doc/bashref.html 2014-04-07 22:47:44 +0000 +++ doc/bashref.html 2015-09-30 13:27:40 +0000 @@ -9838,7 +9838,7 @@kill
kill [-s sigspec] [-n signum] [-sigspec] jobspec or pid -kill -l [exit_status] +kill -l|-L [exit_status] |
Send a signal specified by sigspec or signum to the process
@@ -9847,8 +9847,8 @@
SIGINT (with or without the SIG prefix)
or a signal number; signum is a signal number.
If sigspec and signum are not present, SIGTERM is used.
-The `-l' option lists the signal names.
-If any arguments are supplied when `-l' is given, the names of the
+The `-l' or `-L' options list the signal names.
+If any arguments are supplied when `-l' or `-L' are given, the names of the
signals corresponding to the arguments are listed, and the return status
is zero.
exit_status is a number specifying a signal number or the exit
=== modified file 'doc/bashref.info'
--- doc/bashref.info 2014-04-07 22:47:44 +0000
+++ doc/bashref.info 2015-09-30 13:27:41 +0000
@@ -6700,20 +6700,20 @@
`kill'
kill [-s SIGSPEC] [-n SIGNUM] [-SIGSPEC] JOBSPEC or PID
- kill -l [EXIT_STATUS]
+ kill -l|-L [EXIT_STATUS]
Send a signal specified by SIGSPEC or SIGNUM to the process named
by job specification JOBSPEC or process ID PID. SIGSPEC is either
a case-insensitive signal name such as `SIGINT' (with or without
the `SIG' prefix) or a signal number; SIGNUM is a signal number.
If SIGSPEC and SIGNUM are not present, `SIGTERM' is used. The
- `-l' option lists the signal names. If any arguments are supplied
- when `-l' is given, the names of the signals corresponding to the
- arguments are listed, and the return status is zero. EXIT_STATUS
- is a number specifying a signal number or the exit status of a
- process terminated by a signal. The return status is zero if at
- least one signal was successfully sent, or non-zero if an error
- occurs or an invalid option is encountered.
+ `-l' or `-L' options list the signal names. If any arguments are
+ supplied when `-l' or `-L' are given, the names of the signals
+ corresponding to the arguments are listed, and the return status
+ is zero. EXIT_STATUS is a number specifying a signal number or the
+ exit status of a process terminated by a signal. The return status
+ is zero if at least one signal was successfully sent, or non-zero if
+ an error occurs or an invalid option is encountered.
`wait'
wait [-n] [JOBSPEC or PID ...]
=== modified file 'doc/bashref.texi'
--- doc/bashref.texi 2014-04-07 22:47:44 +0000
+++ doc/bashref.texi 2015-09-30 13:27:42 +0000
@@ -7596,7 +7596,7 @@
@btindex kill
@example
kill [-s @var{sigspec}] [-n @var{signum}] address@hidden @var{jobspec} or @var{pid}
-kill -l address@hidden
+kill -l|-L address@hidden
@end example
Send a signal specified by @var{sigspec} or @var{signum} to the process
@@ -7605,10 +7605,10 @@
@code{SIGINT} (with or without the @code{SIG} prefix)
or a signal number; @var{signum} is a signal number.
If @var{sigspec} and @var{signum} are not present, @code{SIGTERM} is used.
-The @option{-l} option lists the signal names.
-If any arguments are supplied when @option{-l} is given, the names of the
-signals corresponding to the arguments are listed, and the return status
-is zero.
+The @option{-l} or @option{-L} options list the signal names.
+If any arguments are supplied when @option{-l} or @option{-L} are given,
+the names of the signals corresponding to the arguments are listed, and the
+return status is zero.
@var{exit_status} is a number specifying a signal number or the exit
status of a process terminated by a signal.
The return status is zero if at least one signal was successfully sent,