Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
|
|
Also, add trait TimeValLike, so some code can be shared between TimeSpec
and TimeVal.
|
|
|
|
By exposing its members, nix allowed users to create denormalized
TimeVals, which don't work with the derived() Eq and Ord methods.
Better to make TimeVal opaque, so it will always be normalized.
|
|
There were multiple errors regarding Unix domain sockets:
* UnixAddr::path assumed that gethostbyname and similar functions would
include the terminating null as part of len. That is not universally
true. In fact, POSIX only guarantees that len will be at least large
enough to store the non-null-terminated path. So it could be larger or
smaller than nix was assuming. Since abstract sockets' paths are not
strings, we can't modify gethostbyname. Instead, I implemented the fix in
UnixAddr::path and UnixAddr::new. I clarified the documentation too.
* SockAddr::as_ffi_pair contained a Linuxism.
* sockaddr_storage_to_addr forgot to adjust sun_len when creating a UnixAddr
|
|
Change SigFlags into an enum.
Addresses #459.
This is a breaking change.
Should SigFlags be renamed to something more sensible?
|
|
Change KEvent to treat udata as an intptr_t instead of a uintptr_t.
This matches NetBSD's C definitions. Other operating systems define
it as void*, despite not really being a pointer, but none actually
define it as uintptr_t. Better to be right on NetBSD and wrong
everywhere else than wrong everywhere. Plus, it's what mio expects.
Please include this PR in nix 0.8.0
|
|
|
|
|
|
This matches NetBSD's C definitions. Other operating systems define
it as void*, despite not really being a pointer, but none actually
define it as uintptr_t. Better to be right on NetBSD and wrong
everywhere else than wrong everywhere. Plus, it's what mio expects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Additional documentation additions
This is a second round of doc additions. There are also some funcitonal changes to APIs for getting/setting hostname that need to be reviewed.
r? @nix-rust/nix-maintainers
|
|
These make the language consistent in the 3rd person, fix a few
minor mistakes, and remove some superflous prose.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
The script checked for rustc >= 1.6.0, but the minimum supported version for
this crate is now 1.7.0
|
|
|
|
|
|
The previous one was entirely too generic.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Documentation improvements
This series of commits starts to fill in documentation that was not previously present for various calls, mostly in unistd for this pass.
r? @kamalmarhubi
|
|
|
|
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
This is a logical companion to setpgid, so adding an implementation.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <paul.osborne@smartthings.com>
|
|
These were both recently added to libc, add wrappers.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
Changes since v2:
Updated function comments and CHANGELOG
Changes since v1:
Add function comments, update CHANGELOG
|
|
|
|
Don't use it for FilterFlag, because it triggers recursion limit reached error
|
|
Add Mkstemp (fixed for rust 1.2)
I fixed @antifuchs addition of `mkstmp` in https://github.com/nix-rust/nix/pull/365 by making it compile in Rust 1.2 and adding documentation.
A few remarks:
- made it working with Rust 1.2 which needed `to_bytes_with_nul()`. I think the implementation is memory safe but would like to have a pair of eyes checking that
- replaced Path by PathBuf so it's more in line with getcwd
- I didn't move it into another module. If this still the consensus then I would like to do that but in a separate PR (probably moving all stdio methods out)
- it's true that unistd doesn't need mkstmp since there is the crate tempdir and tempfile, but I'd love to see this here for completeness
|
|
|
|
OsString::from_vec on existing path var rather than construct string from pointer
|
|
readability
|
|
|
|
|
|
Fixed a bug where UnixAddr::new_abstract forgot to count the null-byte.
|