from Hacker News

Toward race-free process signaling

by pandalicious on 1/4/19, 6:07 PM with 2 comments

  • by theamk on 1/5/19, 6:16 AM

    > it is done using a new system call named procfd_signal(). This system call operates on a file descriptor of a process; the previous discussions convinced Brauner that this is a solution preferred over an ioctl().

    This is quite a pity! I do a lot of Python and Bash programming, and regular file write will be simple and easily supported.

    ioctl would require some magic constants and arch dependence, but would still be relatively safe - there are no dangerous ioctl operators you can do on a open /proc directory entry, and ioctl has sane error reporting.

    the "new syscall" path is the worst of them all -- I am literally two characters away from invoking all sorts of dangerous commands like "kill all processes", "shutdown machine" and so on.