Skip to content

Draft: Use openat() to read procfs

zxzax requested to merge cycloptic/procps:pidfd into master

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.

Resolves #166, #207

Edited by zxzax

Merge request reports