Re: [PATCH 0/1] *** Fix kill(-1,s) returning 0 on 0 kills ***
From: Petr Skocik
Date: Fri Aug 11 2023 - 19:38:18 EST
Thanks. I appreciate your patch and your researching of this.
I still think returning -EPERM for kill(-1,s) (unlike for kill(-pgrp,s),
where it *can* make sense) is nonsensical because of how POSIX specifies
kill(-1,sig) specifically ("sig shall be sent to all processes
(excluding an unspecified set of system processes) for which the process
has permission to send that signal"). But as I said, any error will do
for me, so I am still grateful for your patch.
(The way I see it, the POSIX-mentioned possible hiding of processes via
ESRCH is a completely different matter. In kill(-1,sig) specifically,
targets that would return -EPERM are excluded/hidden by virtue of the
definition of kill(-1,sig), which makes it different from other types of
kills for which there's no generic need to hide EPERMs (only optional
specific need, hence the paragraph in the POSIX spec on processes with a
different security label)).
Best regards, Petr Skocik