Skip to content

Implementing a more generalized proc pseudo-filesystem abstraction for multiple platforms #162

@Krysztal112233

Description

@Krysztal112233

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions