From: Amit Pinhas Date: Wed, 12 Feb 2025 20:56:20 +0000 (+0200) Subject: man/man2/kill.2: RETURN VALUE: Fix wording issue with sig=0 X-Git-Tag: man-pages-6.11~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71154d16c5b5fe09b46acdfdf7c8a57f8f2fb892;p=thirdparty%2Fman-pages.git man/man2/kill.2: RETURN VALUE: Fix wording issue with sig=0 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 Co-authored-by: Alejandro Colomar Signed-off-by: Amit Pinhas Message-ID: Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/kill.2 b/man/man2/kill.2 index 96468622e..9d3a7411e 100644 --- a/man/man2/kill.2 +++ b/man/man2/kill.2 @@ -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.