New /proc/pid/kill Interface Proposed For Killing Linux Processes
A Google developer has proposed /proc/pid/kill as a new procfs-based kill interface for killing a process on Linux.
With each process running on the system having their own /proc/PID directory, the patch proposal allows writing to /proc/PID/kill with a signal number to kill that process.
The functionality is similar to the kill command except for the process ID originating from the proc file-system rather than an explicit system call parameter, in order to avoid potential race conditions. Ultimately this new /proc/pid/kill interface could be used to write "a race-free and safe pkill."
More details via this patch currently flying on the kernel mailing list under a "request for comments" flag by Google's Daniel Colascione.
With each process running on the system having their own /proc/PID directory, the patch proposal allows writing to /proc/PID/kill with a signal number to kill that process.
The functionality is similar to the kill command except for the process ID originating from the proc file-system rather than an explicit system call parameter, in order to avoid potential race conditions. Ultimately this new /proc/pid/kill interface could be used to write "a race-free and safe pkill."
More details via this patch currently flying on the kernel mailing list under a "request for comments" flag by Google's Daniel Colascione.
30 Comments