eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
362 stars 106 forks source link

Confusing documentation for Stat::comm #249

Closed rust1248 closed 1 year ago

rust1248 commented 1 year ago

The documentation says:

The filename of the executable, in parentheses.

This is visible whether or not the executable is swapped out.

Note that if the actual comm field contains invalid UTF-8 characters, they will be replaced here by the U+FFFD replacement character.

What I understood was that the parentheses were included in the field. I was surprised to see it without.

eminence commented 1 year ago

Hi, I think this relates to the follow comment about the documentation:

In almost all cases, the documentation is taken from the proc.5 manual page. This means that sometimes the style of writing is not very “rusty”, or may do things like reference related files (instead of referencing related structs). Contributions to improve this are welcome.

So most of this documentation is taking from the proc.5 man page, and it wasn't modified to be more suitable for this crate. So we should fix the procfs documentation. Thanks for reporting the issue

rust1248 commented 1 year ago

Do you want me to open a pull request? If yes, should I just update it to The filename of the executable, without the parentheses.

eminence commented 1 year ago

I would be happy to get a PR for this. Yes, The filename of the executable, without the parentheses. sounds good to me