Age | Commit message (Collapse) | Author |
|
921: Get `SO_PEERCRED` working on all Linux targets r=asomers a=jonas-schievink
These were disabled for ARM way back in 0db6ed1a28b4fb4d408cd9b7c4dba0a79bccf1f7 and 09c00ed7d9d92db2a79baa3ed212e7e239edceb9. Try to enable them for all arches and Android as well, since the removal wasn't really explained and I see no reason why this shouldn't work.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
|
|
918: Fix passing multiple file descriptors / control messages via sendmsg r=asomers a=jonas-schievink
Fixes #464
Closes #874 because it's incorporated here
Closes #756 because it adds the test from that issue (with fixes)
Co-authored-by: alecmocatta <alec@mocatta.net>
|
|
|
|
|
|
|
|
|
|
|
|
Rather than using the native implementation of these constants
on supported platforms, the native implementation was instead
emulated. This was also hidden from the user even though this
could result in data races and the functionality being broken.
Native functionality is, however, not support on macos/ios.
Rather than enable this emulation solely for this platform, it
should be removed as this is a dangerous abstraction.
|
|
|
|
libc fixed `bind()` for Android 64-bit targets, so change our
code to match.
|
|
|
|
893: Remove IFF_NOTRAILERS for openbsd r=asomers a=kpcyrd
nix currently doesn't compile on openbsd because `IFF_NOTRAILERS` isn't found. This PR fixes the openbsd build again (tested on 6.3). It seems it was changed in this commit:
https://github.com/openbsd/src/commit/beb8b0dd5985e55a615b52e593da6e75bab33f3f
Co-authored-by: kpcyrd <git@rxv.cc>
|
|
|
|
IFF_NOTRAILERS has been removed in OpenBSD 6.3
https://github.com/openbsd/src/commit/beb8b0dd5985e55a615b52e593da6e75bab33f3f
|
|
892: Fixed ptrace::Request cfg conditions r=asomers a=dalance
The cfg condition of ptrace::Request seems to be different from libc.
For example, PTRACE_GETREGS is defined by libc to i686-unknown-linux-gnu target, but it is not defined in ptrace::Request.
I tried to change the cfg condition to the same as libc's condition.
I thinks this change covers the definitions under src/unix/notbsd directory in libc repository.
Co-authored-by: dalance <dalance@gmail.com>
|
|
|
|
This is a straight port of @abbradar's work in #276, with
two (somewhat weak) tests and a bit of documentation.
|
|
This is useful when using printf-style debugging to observe the variables of
the program.
Also includes a test.
Fixes #885.
|
|
|
|
While usually `ioctl()` passes a pointer, the function call has been
overloaded to allow integers to be passed. For some platforms this
is an `int` and on others it's a `ulong`.
Fixes #824.
|
|
ioctls on FreeBSD and DragonflyBSD have a separate request code generation
macro `_IOWINT` which is now exposed as `request_code_write_int`.
`ioctl_write_int` is also fixed on these platforms to use this new request
|
|
* Split `ioctl!` into separate macros. This makes documentation easier to read.
* For every `ioctl_*!` macro include a description of the macro arguments as, the
function prototype for the generated wrapper function, and an example if we have one.
* Expose `request_code_*!` in the documentation to make the `ioctl_*_bad` macros easier to use.
* Reorganize the file hierarchy to be simpler
|
|
872: Change sys::aio::lio_listio to sys::aio::LioCb::listio r=asomers a=asomers
The new LioCb structure allows us to control the exact arguments passed
to lio_listio, guaranteeing that each call gets a unique storage
location for the list argument. This prevents clients from misusing
lio_listio in a way that causes events to get dropped from a kqueue
Fixes #870
|
|
It helps deal with errors like EAGAIN, which can result in a subset of
an LioCb's operations being queued. The test is only enabled on
FreeBSD, because it requires intimate knowledge of AIO system limits.
|
|
876: add mlockall and munlockall r=asomers a=afck
Closes #875
|
|
|
|
|
|
|
|
Supporting the bytes crate was unnecessarily specific. This change
replaces from_bytes and from_bytes_mut with from_boxed_slice and
from_boxed_mut_slice, which can work with anything that implements
Borrow<[u8]> and BorrowMut<[u8]>, respectively.
|
|
A double panic can screw up the first panic's stack trace. Better not
to assert! anything when the thread is already panicing.
|
|
The new LioCb structure allows us to control the exact arguments passed
to lio_listio, guaranteeing that each call gets a unique storage
location for the list argument. This prevents clients from misusing
lio_listio in a way that causes events to get dropped from a kqueue
Fixes #870
|
|
|
|
On Linux, if the signal trampoline code is in the C library, sigaction
sets the SA_RESTORER flag (0x04000000) in the sa_flags field of old
sigaction (see sigreturn(2)).
This is not intended for application use and is missing from SaFlags,
therefore from_bits fails and unwrapping panics the user program.
This fix just drops the bits that are not defined in SaFlags.
|
|
825: FreeBSD: cfmakesane, EVFILT_* r=Susurrus a=myfreeweb
Depends on: https://github.com/rust-lang/libc/pull/887
|
|
|
|
|
|
|
|
|
|
libc reads sys/statvfs.h on all OS except Windows which nix doesn't care
about.
Closes: https://github.com/nix-rust/nix/issues/831
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
Add Flags: `IFF_NO_PI`, `IFF_TUN`, `IFF_TAP`.
|
|
852: Add step function to ptrace r=Susurrus a=xd009642
Added step function to ptrace, this follows the same form as the PTRACE_CONTINUE by advanced the tracee by a single step!
Found when I was updating to nix 0.10.0 that this function had been missed out. Minor addition as `SINGLESTEP` works the same as `CONTINUE`
|
|
851: Added `getsid` in `::nix::unistd` r=asomers a=ggriffiniii
Resolves Issue #850
|
|
830: Add alarm r=asomers a=Thomasdezeeuw
Fixed #828.
|
|
Example now matches something more akin to an actual usecase.
|
|
Mistakingly removed in d1be45d8405
|
|
This module has two functions;
set: set an alarm, and
cancel: cancels a previously set alarm.
|
|
|
|
Added doc test for sys::ptrace::step and also updated the changelog.
|
|
Added step function to ptrace, this follows the same form as the PTRACE_CONTINUE by advanced the tracee by a single step!
|
|
|