-
Notifications
You must be signed in to change notification settings - Fork 30
Description
In order to cope with multi-platform support and handle different implementations of multiple platforms, it is necessary to abstract different implementations of multiple platforms
The current proc
implementation is a Linux-only implementation and relies heavily on the proc
pseudo-filesystem - it needs to read inside the /proc
filesystem.
- FreeBSD's proc pseudo-fs is not automounted.
- macOS does not have a proc fs, it use
sysctl
instead. - Windows platform are much different from *NIX family.
Due to a lack of thorough consideration at the beginning, only an abstraction for the Linux platform was considered, and most of the code was placed in the pgrep
crate.
And since the process.rs
mod in pgrep
is used by other tools, it had to be refactored first: separating it into a new crate.
Cross-platform support is a very challenging task, so I have put together the following roadmap as the first step towards completing support for other platforms
- New
uuproc
mod. - Basic implementation for FreeBSD
- Basic implementation for macOS
- Basic implementation for Windows