]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2/kill.2: RETURN VALUE: Fix wording issue with sig=0
authorAmit Pinhas <amitpinhass@gmail.com>
Wed, 12 Feb 2025 20:56:20 +0000 (22:56 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 12 Feb 2025 21:23:34 +0000 (22:23 +0100)
The DESCRIPTION says:

If *sig* is 0, then no signal is sent, but existence and
permission checks are still performed; this can be used to
check for the existence of a process ID.

On the other hand, the `RETURN VALUE` section contradicted that.

On success (at least one signal was sent), zero is returned.  On
error, -1 is returned...

How can I get 0 when providing sig=0, if no signal was actually
sent, which is the criteria for success of this call???

Reported-by: Amit Pinhas <amitpinhass@gmail.com>
Co-authored-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Amit Pinhas <amitpinhass@gmail.com>
Message-ID: <a4fa37e0fc89a3c99982ace3fe381991ebe85b00.1739393685.git.amitpinhass@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/kill.2

index 96468622e7216ab73b386e66264dea346f00a8bb..9d3a7411eaf04321b16daeeff9e12af129887d4d 100644 (file)
@@ -79,7 +79,9 @@ it suffices when the sending and receiving
 processes belong to the same session.
 (Historically, the rules were different; see HISTORY.)
 .SH RETURN VALUE
-On success (at least one signal was sent), zero is returned.
+On success, zero is returned.
+If signals were sent to a process group,
+success means that at least one signal was delivered.
 On error, \-1 is returned, and
 .I errno
 is set to indicate the error.