nix/test/common
Jan Bujak 4ae4cfd058 Make uname always safe
This fixes several issues with the current `uname` bindings:

  - Do not ignore `uname` errors; at least on glibc `uname` can fail,
    so now it returns a `Result` instead of assuming that the call
    will always succeed.

  - Do not assume `uname` will initialize every member of `utsname`;
    not every implementation initializes every field, so internally
    the struct is now zero-initialized.

  - Do not blindly assume strings returned by `uname` will always be valid UTF-8;
    `UtsName`'s accessors will now return `&OsStr`s instead of `&str`s.
2022-03-23 14:28:37 +09:00
..
mod.rs Make uname always safe 2022-03-23 14:28:37 +09:00