kill(2) man page: ESRCH
kostikbel at gmail.com
Thu Mar 15 09:34:33 UTC 2012
On Thu, Mar 15, 2012 at 12:43:48AM +0100, Ed Schouten wrote:
> Hi all,
> Just a quick question. The kill(2) man page says:
> The kill() system call will fail and no signal will be sent if:
> [ESRCH] The process id was given as 0 but the sending process
> does not have a process group.
> My question is: is this possible? I thought all processes have a process
> group. POSIX also doesn't mention anything about this case specifically.
> Shall I zap this?
I think this is a bad wording in the man page, up to the point of
error. If the kill pid argument is negative, and corresponding process
group cannot be found, then ERSCH is returned, look at the killpg1(9)
The case of pgrp == 0 indeed cannot result in ESRCH. The later loop over
pg_members shall find at least the sender itself, if pgrp == 0.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20120315/8f591d24/attachment.pgp
More information about the freebsd-arch