Draft: Use openat() to read procfs
Includes fallbacks for kernels that don't support these syscalls. This should resolve any issues with race conditions due to PID reuse. This changes proc_t
, so everything using it needs to be updated to use openat
and readlinkat
. Current progress:
-
pgrep -
pkill -
pidwait -
pidof -
top -
ps -
pmap -
kill -
skill -
snice
Please let me know if it makes sense to split this in separate MRs.
Edited by zxzax