Age | Commit message (Collapse) | Author |
|
|
|
Add POSIX AIO support
POSIX AIO is a standard for asynchronous file I/O. Read, write, and
fsync operations can all take place in the background, with completion
notification delivered by a signal, by a new thread, by kqueue, or not
at all.
The SigEvent class, used for AIO notifications among other things, is
also added.
|
|
|
|
|
|
Add categories to Cargo.toml
Hi! [crates.io now supports categories][categories], which are a curated list
of topics aimed at helping an end-user coming to crates.io looking for
"a crate to do ______".
We're sending pull requests to selected crates to add categories in order to help
populate the categories and seed their usefulness. We've made a guess at the best
category/categories for this crate; if it doesn't fit, please feel free to take
a look at [all the available categories and their descriptions][categories] and
[the slug values that should be specified in your Cargo.toml][slugs] and pick
different ones. If you have a category in mind that isn't available, you can
[send a PR to this file on crates.io][categories.toml] to propose additional
categories.
Crates can have up to 5 categories, and uploading categories to crates.io
currently requires publishing a new version with a cargo nightly from 2017-01-18
or later (it needs to contain [this PR][cargo-pr]).
We've [published a blog post][blog-post] with further details about categories.
The blog post also talks about the new crates.io support for CI badges, which
you may be interested in adding as well.
Please let me know if you have any questions!
[categories]: https://crates.io/categories
[slugs]: https://crates.io/category_slugs
[categories.toml]: https://github.com/rust-lang/crates.io/blob/master/src/categories.toml
[cargo-pr]: https://github.com/rust-lang/cargo/pull/3301
[blog-post]: http://integer32.com/2017/01/20/categories-and-ci-badges.html
|
|
|
|
unistd: add fchdir(2)
This introduces a wrapper for fchdir(2), allowing a process to change
directory based on an open file descriptor.
The underlying function is available in libc crate since 0.2.20.
|
|
|
|
This introduces a wrapper for fchdir(2), allowing a process to change
directory based on an open file descriptor.
The underlying function is available in libc crate since 0.2.20.
|
|
Gethostname sethostname updates
These changes have been previously discussed some with #452 but we decided it made sense to separate things out a bit more.
r? @kamalmarhubi @fiveop
|
|
Baed on discussions on the related PR, sethostname now takes
an `S: AsRef<OsStr>` in order to allow for a greater range of inputs
that allow for a more fluid interface.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Previously gethostname just mutated a buffer. We now provide
a slightly more usable (but still allocation free) API that ensures
that the returned buffer is NUL-terminated. We give back a `&CStr`
instead of requiring that the user do all of the conversions from
`&[u8]` when we know we are dealing with a `&CStr`.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Although the underlying C API does take a pointer to a set of
characters, it is a requirement of almost every operating system
that these bytes not contain a premature NUL character or other
special characters. In other words, you want a `&str`. Changing
this to make the API make a bit more sense.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
fix #480 and add simple test cases for that.
r? @fiveop
|
|
Fix ControlMessage::encode_into when encoding multiple messages
copy_bytes updates dst so that it points after the bytes that were just
copied into it. encode_into did not advance the buffer in the same way
when encoding the data.
See #473
|
|
fix build for eventfd feature
|
|
Always use libc's socketaddr_storage
Since rust-lang/rust#23425 is closed, we no longer need the special
case.
|
|
Since rust-lang/rust#23425 is closed, we no longer need the special
case.
|
|
|
|
|
|
|
|
POSIX AIO is a standard for asynchronous file I/O. Read, write, and
fsync operations can all take place in the background, with completion
notification delivered by a signal, by a new thread, by kqueue, or not
at all. This commit supports all standard AIO functions. However,
lio_listio is disabled on macos because it doesn't seem to work, even
though the syscall is present.
The SigEvent class, used for AIO notifications among other things, is
also added.
Also, impl AsRef for TimeVal and TimeSpec
|
|
Add support for system control sockets for XNU
I added support for macOS and iOS system sockets, which can be used to control the kernel as described [here](https://developer.apple.com/library/content/documentation/Darwin/Conceptual/NKEConceptual/control/control.html).
To do this, I had to add in support for `ioctl` on those platforms, so I added in `ioctl` support for all BSD-based platforms. The API seems to be the same between [xnu](https://opensource.apple.com/source/xnu/xnu-3248.60.10/bsd/sys/ioccom.h.auto.html), [FreeBSD](https://github.com/freebsd/freebsd/blob/master/sys/sys/ioccom.h), [NetBSD](https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/ioccom.h), [OpenBSD](http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/ioccom.h?rev=1.5&content-type=text/x-cvsweb-markup) and [Dragonfly BSD](http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sys/sys/ioccom.h).
I added a test that runs on macOS and iOS for the functionality. Let me know if I need to make any changes!
|
|
Ensure child stack passed to clone is 16 byte aligned.
The current implementation assumes that the array passed by the caller is word aligned (which I don't think Rust guarantees for [u8]) and a multiple of the word size.
|
|
Added getpgrp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r? @fiveop
|
|
|
|
copy_bytes updates dst so that it points after the bytes that were just
copied into it. encode_into did not advance the buffer in the same way
when encoding the data.
|
|
|
|
|
|
|
|
|
|
Add link to release documentation
|
|
|
|
Allow failures of 1.7 builds
Libraries we depend on need newer versions of Rust. The current
stable release is 1.13.
This also disables the CI for the platforms/architectures MIPS, ARM
and Android. This cannot be helped as long as the test infrastructure
only runs on 1.7.
|
|
Libraries we depend on need newer versions of Rust. The current
stable release is 1.13.
This also disables the CI for the platforms/architectures MIPS, ARM
and Android. This cannot be helped as long as the test infrastructure
only runs on 1.7.
|
|
Timespec
Make TimeVal an opaque Newtype, and add another Newtype for Timespec.
|
|
Also, fix the TimeSpec::cmp and TimeVal::cmp methods, and fix some
formatting
|
|
Fixed typo in tcsetpgrp
|
|
|
|
|
|
Also, add trait TimeValLike, so some code can be shared between TimeSpec
and TimeVal.
|