summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-20Add categories to Cargo.tomlJake Goulding
2017-01-19Auto merge of #497 - lucab:to-upstream/fchdir, r=posborneHomu
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.
2017-01-19changelog: update for fchdirLuca Bruno
2017-01-19unistd: add fchdir(2)Luca Bruno
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.
2017-01-18Auto merge of #455 - posborne:gethostname-sethostname-updates, r=kamalmarhubiHomu
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
2017-01-15sethostname: convert to taking OsStr refPaul Osborne
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>
2017-01-15unistd: document and change implementation of gethostnamePaul Osborne
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>
2017-01-15unistd: add docs for gethostname and tweak APIPaul Osborne
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>
2017-01-11Auto merge of #486 - hicqu:master, r=fiveopHomu
fix #480 and add simple test cases for that. r? @fiveop
2017-01-11Auto merge of #489 - fiveop:fixcopyinto, r=fiveopHomu
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
2017-01-11Auto merge of #492 - domsj:fix-eventfd-feature, r=fiveopHomu
fix build for eventfd feature
2017-01-11Auto merge of #496 - fiveop:consolidate_socketaddr_storage, r=@fiveopHomu
Always use libc's socketaddr_storage Since rust-lang/rust#23425 is closed, we no longer need the special case.
2017-01-10Always use libc's socketaddr_storagePhilipp Matthias Schaefer
Since rust-lang/rust#23425 is closed, we no longer need the special case.
2016-12-29fix eventfd buildJan Doms
2016-12-19fix all and update CHANGELOG.mdqupeng
2016-12-19Merge branch 'nix-rust'qupeng
2016-12-17Auto merge of #478 - conradev:sys-control, r=fiveopHomu
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!
2016-12-17Auto merge of #490 - kevindejong:master, r=fiveopHomu
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.
2016-12-17Auto merge of #491 - zethra:master, r=fiveopHomu
Added getpgrp
2016-12-16Fix build on iOS platformConrad Kramer
2016-12-12updated changelogzethra
2016-12-12Added getpgrpzethra
2016-12-12EpollEvent::empty(): using mem::zeroed instead of mem::uninitialized.qupeng
2016-12-12epoll: improve EpollEvent::empty() by using mem::uninitialized.qupeng
2016-12-11test/mod.rs: only test epoll on linux.qupeng
2016-12-11fix EpollEvent::empty()qupeng
2016-12-11add empty() in EpollEvent.qupeng
2016-12-11fix #480 and add simple test cases for that.qupeng
r? @fiveop
2016-12-11Ensure child stack passed to clone is 16 byte aligned.Kevin DeJong
2016-12-10Fix ControlMessage::encode_into when encoding multiple messagesPhilipp Matthias Schaefer
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.
2016-12-10Add support for system control sockets for XNUConrad Kramer
2016-12-10Add ioctl support for BSDConrad Kramer
2016-12-10Change the readwrite buf ioctl call to use a *mut pointerConrad Kramer
2016-12-10Fix typo in documentationConrad Kramer
2016-12-10Merge pull request #485 from fiveop/doc_linkPhilipp Matthias Schäfer
Add link to release documentation
2016-12-10Add link to release documentationPhilipp Matthias Schaefer
2016-12-11Auto merge of #488 - fiveop:disable_17, r=@posborneHomu
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.
2016-12-10Allow failures of 1.7 buildsPhilipp Matthias Schaefer
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.
2016-12-02Auto merge of #475 - asomers:timespec, r=fiveopHomu
Timespec Make TimeVal an opaque Newtype, and add another Newtype for Timespec.
2016-11-25Fix use-after-free in selectAlan Somers
Also, fix the TimeSpec::cmp and TimeVal::cmp methods, and fix some formatting
2016-11-26Auto merge of #477 - zethra:master, r=fiveopHomu
Fixed typo in tcsetpgrp
2016-11-23Fixed typo in tcsetpgrpzethra
2016-11-19update CHANGELOG.md for PR #475Alan Somers
2016-11-19Add TimeSpec, a Newtype around libc::timespecAlan Somers
Also, add trait TimeValLike, so some code can be shared between TimeSpec and TimeVal.
2016-11-19Make TimeVal a NewTypeAlan Somers
2016-11-19Opaqueify TimeValAlan Somers
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.
2016-11-19Auto merge of #474 - asomers:unixdomain, r=fiveopHomu
Fix multiple issues with Unix domain sockets
2016-11-18update CHANGELOG.md for PR #474Alan Somers
2016-11-18Improve portability of test_getsocknameAlan Somers
test_getsockname used an IPv4 socket and assumed that localhost was "127.0.0.1". But that assumption doesn't hold on IPv6-only hosts or on shared-IP FreeBSD jails. Unfortunately, the Rust standard library doesn't provide a good way to resolve localhost. So change the test to use a unix-domain socket instead.
2016-11-18Fix Unix domain sockets.Alan Somers
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