Hi,

Michael Daniels <[email protected]> writes:

> It looks like a doctest fails when providing `configure` the
> `--enable-install-program=kill,uptime` flag (per NEWS for v9.10).
>
> ```
>> ./configure --enable-install-program=kill,uptime
> ...
>> make -j
> ...
>> make -j check
> ...
> FAIL: tests/misc/usage_vs_refs
> ==============================
>
> kill -s reference missing in texi
> kill --signal reference missing in texi
> kill -SIGNAL reference missing in texi
> kill -l reference missing in texi
> kill --list reference missing in texi
> kill --table reference missing in texi
> FAIL tests/misc/usage_vs_refs.sh (exit status: 1)
> ...
> ```
>
> This occurs on Debian and NixOS, both on x86_64 using WSL.
> I haven't tested on any other platforms.
>
> I've attached test_suite.log (tarred and gzipped).

Thanks for the report.

I guess there is worse bugs to find out about right after a release. :)
Most shells have a builtin 'kill' command, so these links will get less
use.

The 'kill' documentation was formatted a bit differently than the other
programs, most likely because it serves two different purposes; listing
signals and actually killing programs.

I've attatched a patch after reorganizing it a bit so the anchors are
created. I haven't pushed it yet Pádraig in case you want to make any
changes and/or update the manual on gnu.org.

Collin

>From 9bf3e12caff9b597ef3299704503395ac8743af1 Mon Sep 17 00:00:00 2001
Message-ID: <9bf3e12caff9b597ef3299704503395ac8743af1.1770356686.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Thu, 5 Feb 2026 21:18:25 -0800
Subject: [PATCH] doc: kill: adjust documentation to produce html anchors for
 --help

* NEWS: Mention the bug fix.
* doc/coreutils.texi (kill invocation): Adjust documentation to use the
@optItem macros.
* tests/misc/usage_vs_refs.sh (getopts): Filter out -SIGNAL.
---
 NEWS                        |  5 +++++
 doc/coreutils.texi          | 35 +++++++++++++++++++++++------------
 tests/misc/usage_vs_refs.sh |  1 +
 3 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/NEWS b/NEWS
index 67ff49939..5fbf1bdc5 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Bug fixes
+
+  'kill --help' now has links to valid anchors in the html manual.
+  [bug introduced in coreutils-9.10]
+
 
 * Noteworthy changes in release 9.10 (2026-02-04) [stable]
 
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index a02e8d73b..3f90eed06 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -18354,18 +18354,29 @@ @node kill invocation
 argument specifies at least one process that the signal was sent to.
 
 The second form of the @command{kill} command lists signal information.
-Either the @option{-l} or @option{--list} option, or the @option{-t}
-or @option{--table} option must be specified.  Without any
-@var{signal} argument, all supported signals are listed.  The output
-of @option{-l} or @option{--list} is a list of the signal names, one
-per line; if @var{signal} is already a name, the signal number is
-printed instead.  The output of @option{-t} or @option{--table} is a
-table of signal numbers, names, and descriptions.  This form of the
-@command{kill} command succeeds if all @var{signal} arguments are valid
-and if there is no output error.
-
-The @command{kill} command also supports the @option{--help} and
-@option{--version} options.  @xref{Common options}.
+This form of the @command{kill} command succeeds if all @var{signal}
+arguments are valid and if there is no output error.
+
+The program accepts the following options.  Also see @ref{Common options}.
+
+@table @samp
+
+@optItem{kill,-s,}
+@optItemx{kill,--signal,}
+Specify the name or number of the signal to be sent.
+
+@optItem{kill,-l,}
+@optItemx{kill,--list,}
+List the supported signal names one per line if the @var{signal} option
+is omitted.  If one or more @var{signal} options are provided, they are
+converted between signal names and signal numbers.
+
+@optItem{kill,-t,}
+@optItemx{kill,--table,}
+This option behaves the same way as @option{--list} except it prints a
+table of signal numbers, names, and descriptions.
+
+@end table
 
 A @var{signal} may be a signal name like @samp{HUP}, or a signal
 number like @samp{1}, or an exit status of a process terminated by the
diff --git a/tests/misc/usage_vs_refs.sh b/tests/misc/usage_vs_refs.sh
index 6e5a43f21..2d60184a4 100755
--- a/tests/misc/usage_vs_refs.sh
+++ b/tests/misc/usage_vs_refs.sh
@@ -24,6 +24,7 @@ longopts() { getopts $1 | cut -s -d'"' -f2; }
 
 getopts() {
   skip='--help|--version'              # These refs treated specially
+  skip="$skip|-SIGNAL"                 # This one comes after --signal
 
   env "$1" --help |
   grep -E '^(  -|      --)' |          # find options
-- 
2.53.0

Reply via email to