nix
nix copied to clipboard
Rust friendly bindings to *nix APIs
These two syscalls sequentially scan the `/etc/passwd/ and `/etc/group` databases and return all the entries in those files one by one. #### Signature ```rust pub fn getpwent() -> Result; pub...
Although this is basically implemented in https://github.com/nicokoch/reflink/blob/master/src/sys/unix.rs, the code itself doesn't work portable on all architectures where linux runs (https://github.com/nicokoch/reflink/pull/7), and fixing it would require a duplication of code from...
I had a usecase for pthread_sigqueue so I added it to nix. Implementation is pretty much the same as pthread_kill. Requires a libc version bump.
I noticed that `Cargo.lock.msrv` is currently listing an old version of `libc` which we can't possibly build with anymore (due to requiring new functions/constants)... it seems like the Minver CI...
Doc for `getrlimit` and `setrlimit` mentions RLIM_INFINITY constant but doesn't mention it comes from the libc crate. Maybe it should, or the constant could be re-exported in the `nix::sys::resource` namespace....
As above, there's no `.as_unix_addr()` / `.as_unix_addr_mut()` methods on SockaddrStorage. Comparing the list from https://docs.rs/nix/latest/nix/sys/socket/trait.SockaddrLike.html#implementors to https://docs.rs/nix/latest/nix/sys/socket/union.SockaddrStorage.html#implementations : - SockAddr deprecated not needed. - AlgAddr => as_alg_addr / as_alg_addr_mut -...
Many high level libraries will accept anything that implements `std::net::ToSocketAddrs` as an address (eg: `std::net::TcpListener::bind()`, `tokio::net::UdpSocket::bind()` etc), but the various nix Sockaddr* types don't implement this. nix already implements `From...
## What does this PR do Fix #2323 Change the signature of `ptrace::write` and `ptrace::write_user` to make them safe ## Checklist: - [x] I have read `CONTRIBUTING.md` - [x] I...
## What does this PR do ## Checklist: - [X] I have read `CONTRIBUTING.md` - [x] I have written necessary tests and rustdoc comments - [X] A change log has...
`sigaction` currently only accepts the `Signal` enum and directly passes it to `libc::sigaction` as a c_int. I'm working on a linux system that has custom signals superior to 32. And...