nix
nix copied to clipboard
Rust friendly bindings to *nix APIs
* [RFC](https://github.com/rust-lang/rfcs/blob/master/text/3013-conditional-compilation-checking.md#checking-conditional-compilation-at-compile-time) * [Tracking issue](https://github.com/rust-lang/cargo/issues/10554) This will check invalid conditions, which would be quite useful for us, see the following demo: ```rs #[cfg(target_os = "linxu")] // NOTE this typo! fn...
Implemented [`pidfd_getfd`](https://man7.org/linux/man-pages/man2/pidfd_getfd.2.html), [`pid_open`](https://man7.org/linux/man-pages/man2/pidfd_open.2.html) and [`pidfd_send_signal`](https://man7.org/linux/man-pages/man2/pidfd_send_signal.2.html). It seems `PIDFD_NONBLOCK` is missing from `libc` on `musl` toolchains: https://github.com/rust-lang/libc/issues/3002. Previously blocked on https://github.com/nix-rust/nix/pull/1962, https://github.com/rust-lang/libc/pull/3012 and https://github.com/rust-lang/libc/issues/3026.
## What does this PR do Implement `EventFd::read/write` with `libc::eventfd_read()/eventfd_write()` functions instead of implementing them ourselves so that we can survive even when libc has its behavior changed ## Checklist:...
Currently I can't seem to find any way to create a new LinkAddr or modify a LinkAddr. The only way I'm able to get a LinkAddr is through `getifaddrs()`. But...
I'm a heavy user of `poll` and a standard idiom is to create *n* entries, but not to use all of them at all times --- `poll` allows `fd` to...
I get the following error: ```rs error[E0432]: unresolved import `nix::fcntl` --> src/lib.rs:7:10 | 7 | use nix::fcntl::{flock, FlockArg}; | ^^^^^ could not find `fcntl` in `nix` ``` When I try...
Mutex
Added a mutex interface.
`recvm(m)sg` now calling `SockaddrLike::from_raw` instead of `assume_init` on the received address ## Checklist: - [x] I have read `CONTRIBUTING.md` - [x] I have written necessary tests and rustdoc comments -...
This is related to https://github.com/nix-rust/nix/pull/1695, but have many issues solved here: - `{get,set}regset` now allows specifying which set of registers to read/write, as defined in `RegisterSet`. This should be the...