rustix
rustix copied to clipboard
Safe Rust bindings to POSIX-ish APIs
Trying to build this crate with `--target wasm32-wasip2` leads to errors: ``` error[E0658]: use of unstable library feature 'wasip2' --> /home/r/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.34/src/maybe_polyfill/std/mod.rs:30:13 | 30 | AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd,...
The [`rustix::io::close`](https://docs.rs/rustix/latest/rustix/io/fn.close.html) explain why it does not return theoretically possible errors, but in our code we already return IO errors from function which drops `OwnedFd`, so we can "bubble" potential...
🤔 _I find that only references to `Winsize` are used in the implementation._ Refs: #671, #673 ✨ I've understood. It's because `Winsize` is too small, so it's OK to pass...
These tests were added in #1069, but despite the names suggesting that they test all of stdin, stdout and stderr, the tests were identical and only tested stdout.
The `dup2_std*` functions had a few soundness issues that allowed safe code to close the stdio file descriptors. 1. `AsFd::as_fd()` was called twice, possibly returning a different `BorrowedFd` each time....
Solve #1076
I noticed that `msg_namelen` is being set to the size of `SocketAddr*`, which seems to be incorrect. So I also added a commit changing that for the existing socket address...
Hi, may I require supporting `fcntl_getlk`?