Index | Thread | Search

From:
Ingo Schwarze <schwarze@usta.de>
Subject:
Re: [PATCH] man 1 pkill: Add where signals can be found
To:
h@hartzer.sh
Cc:
tech@openbsd.org
Date:
Sat, 19 Apr 2025 22:34:36 +0200

Download raw body.

Thread
Hello Henrich,

H. Hartzer wrote on Sat, Apr 19, 2025 at 07:50:52PM +0000:

> Here's a patch that adds where to find signals to the pkill(1) man page.

I like the basic idea.  The kill(1) manual page also refers
to sigaction(2) near the end of the DESCRIPTION, and kill(2)
even does that at the beginning of the DESCRIPTION.

> sigaction(2) is already referenced under "see also," but without any
> prior explanation as to why.

Indeed, the purpose of the existing .Xr may not be obvious
to less experienced users.

We generally don't want to talk about "you" in manual pages, though,
so here is what i suggest.

Since "TERM" is a string that has to be typed in verbatim, it should
appear in bold face, and actually, a dash has to be typed in front of it,
which is exactly what the .Fl macro does.  That macro also makes sense
semantically because "-TERM" clearly serves the function of a command
line flag.

OK?
  Ingo


Index: pkill.1
===================================================================
RCS file: /cvs/src/usr.bin/pkill/pkill.1,v
diff -u -r1.25 pkill.1
--- pkill.1	14 Nov 2020 14:06:42 -0000	1.25
+++ pkill.1	19 Apr 2025 20:28:48 -0000
@@ -166,8 +166,10 @@
 is given.
 The default is to match any substring.
 .It Fl Ar signal
-A non-negative decimal number or symbolic signal name specifying the signal
-to be sent instead of the default TERM.
+A non-negative decimal number or one of the symbolic names listed in
+.Xr sigaction 2
+specifying the signal to be sent instead of the default
+.Fl TERM .
 This option is valid only when given as the first argument to
 .Nm pkill .
 .El


> diff --git a/usr.bin/pkill/pkill.1 b/usr.bin/pkill/pkill.1
> index d8719b79991..91c0970b5e1 100644
> --- a/usr.bin/pkill/pkill.1
> +++ b/usr.bin/pkill/pkill.1
> @@ -170,6 +170,9 @@ A non-negative decimal number or symbolic signal name specifying the signal
>  to be sent instead of the default TERM.
>  This option is valid only when given as the first argument to
>  .Nm pkill .
> +For a list of signals that you can use, see the
> +.Xr sigaction 2
> +manual page.
>  .El
>  .Pp
>  If any