Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
|
|
|
|
|
|
|
|
Fix markdown in the CHANGELOG
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
Also alter Debug to output all fields.
|
|
|
|
|
|
843: Support arbitrary baud rates on BSDs r=asomers a=Susurrus
Closes #842
|
|
|
|
835: Add socket options for IP_TRANSPARENT / BIND_ANY r=asomers a=justinlatimer
Add socket options for implementing a transparent proxy.
Sources:
[Linux](https://www.kernel.org/doc/Documentation/networking/tproxy.txt)
[OpenBSD](https://man.openbsd.org/setsockopt.2#SO_BINDANY)
[FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=ip&manpath=FreeBSD+11.1-RELEASE)
Thanks!
|
|
820: Change AioCb to primarily use Bytes instead of Rc<[u8]> r=Susurrus a=asomers
`Rc<[u8]>` isn't a very good buffer type to use for aio. For one thing, it lacks interior mutability. For another, a single `Rc<[u8]>` can't be carved up into smaller buffers of the same type. `Bytes` and `BytesMut` fix both problems. This PR removes the ability to construct an `AioCb` from `Rc<[u8]>` and adds the ability to construct one from `Bytes`, `BytesMut`, or raw pointers (for consumers who need even more flexibility). At this stage, the PR has the following warts:
1. A hack is necessary to force small `Bytes` buffers to allocate on the heap. I plan to fix this with an enhancement to the bytes crate.
2. The `AioCb::buffer` method is necessary due to a deficiency in the tokio-core crate. Once I fix that, then only `AioCb::into_buffer`will need to be public.
|
|
It's not actually safe to read into an `Rc<[u8]>`. It only worked
because of a coincidental `unsafe` block. Replace that type with
`BytesMut` from the bytes crate. For consistency's sake, use `Bytes`
for writing too, and completely remove methods relating to `Rc<[u8]>`.
Note that the `AioCb` will actually own the `BytesMut` object. The
caller must call `into_buffer` to get it back once the I/O is complete.
Fixes #788
|
|
|
|
|
|
`pause` will always return `-1` as a result and sets `errno` to
`EINTR`, which indicates that a signal was caught by the process. Since
this is the point of `pause` return an error here makes little sense.
Closes #827.
|
|
834: Expose mqueue functions for all supported OSes r=asomers a=asomers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|