Skip to content

Textual information from /proc should not be exposed as String #349

@hillu

Description

@hillu

The kernel does not care about proper UTF-8 encodings, so conversion into String are always lossy operations.
Process.cmdline() should return a Vec<OsString>, Stat.comm should be an OsString. These are the only examples I noticed when checking whether I could replace my own code with procfs – there are probably quite a few other examples.

Would you accept a PR that replaces those uses of String with OsString? I am aware that this would require an API version bump – if you don't want to do that, I could also do a patch that only adds fields and methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions