kill -0 <pid> --- side effect or supported

Ngie Cooper (yaneurabeya) yaneurabeya at gmail.com
Sat Mar 4 01:01:05 UTC 2017


> On Mar 3, 2017, at 16:55, Rodney W. Grimes <freebsd-rwg at pdx.rh.CN85.dnsmgr.net> wrote:

…

> yes, but make it explicity clear just like it is explicity clear in kill(2),
> documentation should be good, clear and concise, not left for guessing
> between the lines.  Add a 0 item to the list of popular signals, or
> add a sentence about this special case that is not well known.

True.

>> It might be a good idea to clarify this point/behavior by pointing to kill(2) for the signal behavior/description noted above.
> 
> It already has a xref to kill(2).  Compters derefence pointers better
> than people do, so we can use all the help we can get, and if we are
> reading a man page we need help!

I meant, make the Xr’ef more obvious, e.g.,

See
.Xr kill 2
for more details about the behavior of signum.

Also, I agree that kill(2) should be clearer. POSIX already does a good job filling in that gap. From http://pubs.opengroup.org/onlinepubs/9699919799/functions/kill.html :

The kill() function shall send a signal to a process or a group of processes specified by pid. The signal to be sent is specified by sig and is either one from the list given in <signal.h> or 0. If sig is 0 (the null signal), error checking is performed but no signal is actually sent. The null signal can be used to check the validity of pid.

Thanks,
-Ngie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20170303/de6be5ad/attachment.sig>


More information about the freebsd-hackers mailing list