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
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
procimplementation is a Linux-only implementation and relies heavily on theprocpseudo-filesystem - it needs to read inside the/procfilesystem.sysctlinstead.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
pgrepcrate.And since the
process.rsmod inpgrepis 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
uuproccreate.