summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-12-11Ensure child stack passed to clone is 16 byte aligned.Kevin DeJong
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-23Fixed typo in tcsetpgrpzethra
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-13Avoid TempDir::into_path(), because it doesn't cleanup on DropAlan Somers
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-08Added .map(drop) as requestedzethra
2016-11-08Merge remote-tracking branch 'upstream/master'zethra
2016-11-08Added documention to tcgetpgrp and tcsetpgrpzethra
2016-11-06Add some tests for sys::signal.David Hou
2016-11-06Change SigFlags into an enum.David Hou
2016-11-03Add CLONE_NEWCGROUPDylan Reid
2016-11-02Auto merge of #452 - posborne:additional-documentation-additions, r=fiveopHomu
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
2016-11-01unistd: doc updates based on review commentsPaul Osborne
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>
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-29unistd: add module-level doc comment that makes sensePaul Osborne
The previous one was entirely too generic. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-29unistd: add documentation for the daemon functionPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-29unistd: add docs for exec* functionsPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-30Auto merge of #449 - posborne:documentation-improvements, r=kamalmarhubiHomu
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
2016-10-28remove extra line in the commitkiddkai
2016-10-28add getpgidkiddkai
2016-10-27unistd: add docs for chownPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27unistd: add docs for chdirPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27unistd: document the dup, dup2, and dup3 callsPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27unistd: add documentation for gettidPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27unistd: add setsid implementationPaul Osborne
This is a logical companion to setpgid, so adding an implementation. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27unistd: add documentation for setpgidPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27unistd: add docs for getpid/getppidPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27unistd: add better docs for fork()Paul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-10-27error: add documentation for nix::ErrorPaul Osborne
Signed-off-by: Paul Osborne <paul.osborne@smartthings.com>
2016-10-26Add setresuid and setresgidDylan Reid
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
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-10-02Auto merge of #428 - philippkeller:mkstemp, r=fiveopHomu
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
2016-09-28Add debug_assert ensuring popped byte is nulPhilipp Keller
2016-09-27Remove double copy of array (to_owned() and PathBuf::from), use ↵Philipp Keller
OsString::from_vec on existing path var rather than construct string from pointer
2016-09-27move path outside closure to avoid use after free, restructed for easier ↵Philipp Keller
readability
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-18Auto merge of #429 - Idolf:master, r=fiveopHomu
Fixed a bug where UnixAddr::new_abstract forgot to count the null-byte.