summaryrefslogtreecommitdiff
path: root/src/sys
AgeCommit message (Collapse)Author
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-16Fix build on iOS platformConrad Kramer
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-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-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-11-25Fix use-after-free in selectAlan Somers
Also, fix the TimeSpec::cmp and TimeVal::cmp methods, and fix some formatting
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-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
2016-11-15Auto merge of #460 - chaosagent:sys_signal, r=fiveopHomu
Change SigFlags into an enum. Addresses #459. This is a breaking change. Should SigFlags be renamed to something more sensible?
2016-11-15Auto merge of #463 - asomers:kevent, r=fiveopHomu
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
2016-11-14Make signal argument to kill optionalPhilipp Matthias Schaefer
2016-11-10Change KEvent to treat udata as an intptr_t instead of a uintptr_t.Alan Somers
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.
2016-11-08Rename SigFlags to SigmaskHowDavid Hou
2016-11-06Add some tests for sys::signal.David Hou
2016-11-06Change SigFlags into an enum.David Hou
2016-10-31Remove `rustc-version` dependency and build scriptAlex Crichton
The script checked for rustc >= 1.6.0, but the minimum supported version for this crate is now 1.7.0
2016-10-29Update comments and CHANGELOG for PR 442Alan Somers
2016-10-29impl Send for KEventAlan Somers
2016-10-13Merge github.com:nix-rust/nix into evfiltAlan Somers
2016-10-02Use libc_bitflags! for EventFlagAlan Somers
Don't use it for FilterFlag, because it triggers recursion limit reached error
2016-09-18struct KEvent should wrap an inner libc::kevent structureAlan Somers
2016-09-17Removes SIGSTKFLT when cross-compiling to MIPS.Tim Ryan
2016-09-17Fixed a bug where UnixAddr::new_abstract forgot to count the null-byte.Mathias Svensson
2016-09-17Auto merge of #410 - fiveop:epoll_create1, r=posborneHomu
Add epoll_create1 In order to get @kubo39's PR #384 forward, I cleaned up the commit history a bit and added `EpollEvent` back. Since this module is used by mio, maybe @carllerche could comment on these changes.
2016-09-15Rename EpollEventKind to EpollFlags, according to convention.Philipp Matthias Schaefer
2016-09-15Add EpollCrateFlags bitflag type.Philipp Matthias Schaefer
2016-09-09Add MSG_CMSG_CLOEXEC to MsgFlags on LinuxSebastian Dröge
Fixes #421.
2016-09-08Remove macos NOTE_ definitions that aren't in libcAlan Somers
2016-09-08Reconcile with libc changesAlan Somers
The final version of libc's PR #379 removed a few definitions, and fixed OpenBSD's definition of fn kevent.
2016-09-08Add property readers to EpollEventPhilipp Matthias Schaefer
2016-09-08Readd EpollEventPhilipp Matthias Schaefer
2016-09-08Use libc's declarationsHiroki Noda
2016-09-08Not to set EPOLL_CLOEXEC by default.Hiroki Noda
2016-09-08Add epoll_create1 and set EPOLL_CLOEXEC flag by default.Hiroki Noda