nix
nix copied to clipboard
Rust friendly bindings to *nix APIs
The new `Epoll` API (as at nix 0.27) should be marked `unsafe`, probably on `Epoll::add()`. Currently the API has no `unsafe` on it, uses types from the [io-safety proposal](https://rust-lang.github.io/rfcs/3128-io-safety.html) -...
## What does this PR do In case there are any unrecognised bits, they should be kept when setting fields of the underlying libc `termios` struct in `get_libc_termios`, rather than...
Implement `sys::ptrace::getsyscallinfo` via `ptrace(PTRACE_GET_SYSCALL_INFO, ...)`, which is available since Linux 5.3.
Hello, For some reason, `nix::unistd::initgroups` is explicitly not defined for macOS, with ~~no~~ incorrect justification in the docs: https://github.com/nix-rust/nix/blob/75a26cd1e0b44c8d953633ee45cfc189cda7e4d7/src/unistd.rs#L1782 This is strange, because the API [definitely exists](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/initgroups.3.html). I'm unsure if...
## What does this PR do 1. Make `Epoll`-associated functions take `BorrowedFd` so that it is consistent with `FdSet` and `PollFd` 2. Update the tests in `test_epoll.rs`, use the new...
Split off from #2199 Script I used to generate the variants: https://gist.github.com/Jan561/067d64641c93017a9bf6b346ac078ec1 ## Checklist: - [x] I have read `CONTRIBUTING.md` - [x] I have written necessary tests and rustdoc comments...
This adds an ergonomic wrapper for the Linux-specific `open_tree(2)` syscall, using safe-io file descriptors. The syscall has been introduced in kernel version 5.2 and allows FD-based manipulation of mount hierarchies.
Alternative to #2235 ## Checklist: - [x] I have read `CONTRIBUTING.md` - [x] I have written necessary tests and rustdoc comments - [x] A change log has been added if...
Preparation to fyx #2177. Example Implementation for `SockaddrIn`: ```rust unsafe impl private::SockaddrFromRawPriv for Option { type Storage = libc::sockaddr_in; unsafe fn from_raw( addr: *const Self::Storage, len: usize, ) -> Self...
Related to page alignment, adding map_aligned for custom alignment requirements.