On Thu, Nov 1, 2018 at 11:53 AM, David Laight <david.lai...@aculab.com> wrote: > From: Sent: 31 October 2018 13:28 > ... >> * I actually have a local variant of the patch that would have you >> open "/proc/$PID/kill/$SIGNO" instead, since different signal numbers >> have different permission checks. > > I think you'd need the open() to specify some specific unusual > open modes. > Otherwise it'll be far too easy for scripts (and people) to > accidentally send every signal to every process.
I think the /proc/$PID/kill/$SIGNO idea is dead anyway, and even dead-er since Linus banned write() for commands. (Looks like we'll need a system call after all.) That said, for the record, I was talking about the *write* sending the signal, not the open, so grep of /proc wouldn't send random signals to every process. > Also think of the memory footprint. Proc inodes are created on-demand, so AIUI, the memory overhead of heaving a per-FD directory of stuff isn't very high.