summaryrefslogtreecommitdiff
path: root/src/sys/sendfile.rs
diff options
context:
space:
mode:
authorJan Bujak <jan@parity.io>2022-03-23 05:28:29 +0000
committerJan Bujak <jan@parity.io>2022-03-23 14:28:37 +0900
commit4ae4cfd0588fbe93e1cc6501bcb98893ebdf26f3 (patch)
treea0aac77caa70d7fbf7176fd7a10fb0c387dd0cce /src/sys/sendfile.rs
parent3ca28f681ca7b7caa08809f19ae4f3eccc1d41a2 (diff)
downloadnix-4ae4cfd0588fbe93e1cc6501bcb98893ebdf26f3.zip
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.
Diffstat (limited to 'src/sys/sendfile.rs')
0 files changed, 0 insertions, 0 deletions