summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-17Merge #990bors[bot]
990: Add cmsg PKTINFO for IPv4 and IPv6. r=asomers a=pusateri Replaces #891 and attempts to address all previous concerns. Co-authored-by: Tom Pusateri <pusateri@bangj.com>
2018-12-15Add cmsg PKTINFO for IPv4 and IPv6.Tom Pusateri
ignore pktinfo tests on qemu mips,mips64,powerpc64 Original work by @mcginty.
2018-12-12Merge #997bors[bot]
997: Implement symlinkat r=asomers a=oblique Co-authored-by: oblique <psyberbits@gmail.com>
2018-12-12Implement symlinkatoblique
2018-12-09Merge #995bors[bot]
995: Replace try! with ? r=asomers a=asomers try! is not available in Rust 2018. It would be premature to convert the entire project to Rust 2018, since that would bump the minimum compiler to 1.31.0. But his change will help us when we do convert it eventually. Co-authored-by: Alan Somers <asomers@gmail.com>
2018-12-08Replace try! with ?Alan Somers
try! is not available in Rust 2018
2018-12-06Merge #972bors[bot]
972: Add support of TCP_CONGESTION for setsockopt r=asomers a=Fensteer Implementation proposal for support of TCP_CONGESTION param for `setsockopt`and `getsockopt` with the CString type. Co-authored-by: Fensteer <fensteer@protonmail.com>
2018-12-06Add support of TCP_CONGESTION for setsockoptFensteer
2018-12-06Merge #989bors[bot]
989: DragonflyBSD: Remove unused Errno's r=asomers a=levex EUNUSED* were removed from <sys/errno.h> in DragonflyBSD, so there is no need for them to be in nix either. This also fixes the build on DragonflyBSD. r? @asomers cc/ @mneumann Signed-off-by: Levente Kurusa <lkurusa@acm.org> Co-authored-by: Levente Kurusa <lkurusa@acm.org>
2018-12-03DragonflyBSD: Remove unused Errno'sLevente Kurusa
EUNUSED* were removed from <sys/errno.h> in DragonflyBSD, so there is no need for them to be in nix either. This also fixes the build on DragonflyBSD. Signed-off-by: Levente Kurusa <lkurusa@acm.org>
2018-12-03Merge #987bors[bot]
987: Fix builds on sparc64-unknown-linux-gnu r=asomers a=Susurrus Co-authored-by: Bryant Mairs <bryant@mai.rs>
2018-12-01Remove duplicate termios constantsBryant Mairs
These constants have the same value on sparc64, so need to be removed as enums in Rust can't have multiple names for the same value.
2018-12-01Add ioctl definitions for sparc64-linuxBryant Mairs
2018-12-01Fix missing SIGSTKFLT on sparc64-linuxBryant Mairs
2018-12-01Correct architecture checkBryant Mairs
2018-12-01Fix baud rate constants on sparc64-linuxBryant Mairs
2018-11-30Merge #985bors[bot]
985: Restore the libc dependency to the git version post-release r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2018-11-28Restore the libc dependency to the git version post-releaseAlan Somers
2018-11-28Merge #983bors[bot]
983: Bump version to 0.12.0 r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2018-11-28Merge #984bors[bot]
984: Prefer `map(drop)` to `map(|_| ())` r=asomers a=asomers I previously advocated for the latter syntax on stylistic grounds. But it generates less efficient code, because it creates a new lambda function for each usage. The optimizer does not combine them. This change saves about 6KB of code. Co-authored-by: Alan Somers <asomers@gmail.com>
2018-11-28Prefer `map(drop)` to `map(|_| ())`Alan Somers
I previously advocated for the latter syntax on stylistic grounds. But it generates less efficient code, because it creates a new lambda function for each usage. The optimizer does not combine them. This change saves about 6KB of code.
2018-11-28Bump version to 0.12.0Alan Somers
2018-11-28Merge #982bors[bot]
982: Fix libc at 0.2.44 in preparation for release r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2018-11-27Fix libc at 0.2.44 in preparation for releaseAlan Somers
2018-11-27Merge #977bors[bot]
977: Error as i32 r=asomers a=asomers Add Error::as_errno This method is useful when it can be statically determined that a nix::Error be an errno, which I find to be very common. Also, fix some recently introduced compiler warnings. Co-authored-by: Alan Somers <asomers@gmail.com>
2018-11-27Merge #967bors[bot]
967: Add a wrapper for lutimes(2) r=asomers a=jmmv PR #944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. This should have been part of PR #946, which added a wrapper for utimes(2) following this same rationale, but missed lutimes(2) because I simply didn't notice it existed. Co-authored-by: Julio Merino <julio@meroh.net>
2018-11-23Fix unused warnings on FreeBSD from PR #952Alan Somers
2018-11-23Add Error::as_errnoAlan Somers
This method is useful when it can be statically determined that a nix::Error be an errno, which I find to be very common.
2018-11-23Merge #975bors[bot]
975: Add execvpe support, conditional on platform r=asomers a=F1rst-Unicorn This closes #682 Co-authored-by: F1rst-Unicorn <f1rst_unicorn@njsm.de>
2018-11-19Add execvpe support, conditional on platformF1rst-Unicorn
2018-11-16Merge #973bors[bot]
973: CHANGELOG: move entry from #884 from 0.11.0 to [Unreleased] r=asomers a=mpasternacki PR #884 added changelog entry in section for 0.11.0, which has been already released, instead of in the [Unreleased] section (which wasn't present yet). Moved the entry where it belongs. Co-authored-by: Maciej Pasternacki <maciej@3ofcoins.net>
2018-11-16CHANGELOG: move entry from #884 from 0.11.0 to unreleased where it belongs.Maciej Pasternacki
2018-11-09Merge #970bors[bot]
970: Add example for setsockopt r=asomers a=povilasb > Every great project needs great documentation ...one step at a time though :) Co-authored-by: Povilas Balciunas <balciunas90@gmail.com>
2018-11-09Add example for setsockoptPovilas Balciunas
Makes it easier for newcomers :)
2018-11-08Merge #968bors[bot]
968: Make sys::time::{time_t, suseconds_t} public r=asomers a=jmmv This allows handling the return values of other public functions (such as TimeVal's tv_sec and tv_usec) without having to pull in these types from libc (which is ugly if a project is trying to use nix exclusively to avoid libc's unsafety). Co-authored-by: Julio Merino <julio@meroh.net>
2018-11-07Add a wrapper for lutimes(2)Julio Merino
PR #944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. This should have been part of PR #946, which added a wrapper for utimes(2) following this same rationale, but missed lutimes(2) because I simply didn't notice it existed.
2018-11-07Make sys::time::{time_t, suseconds_t} publicJulio Merino
This allows handling the return values of other public functions (such as TimeVal's tv_sec and tv_usec) without having to pull in these types from libc (which is ugly if a project is trying to use nix exclusively to avoid libc's unsafety).
2018-11-05Merge #966bors[bot]
966: Require Rust 1.24.1 r=asomers a=Susurrus `lazy_static` as of 1.2 requires Rust 1.24.1, so make that our minimum required. This was discovered when I looked into the failures of #965. @asomers if you agree with this change, could you update the buildbots here too? Co-authored-by: Bryant Mairs <bryantmairs@google.com>
2018-11-05Require Rust 1.24.1Bryant Mairs
lazy_static as of 1.2 requires Rust 1.24.1, so make that our minimum required version
2018-11-02Merge #962bors[bot]
962: exclude more CI files from crates.io r=asomers a=ignatenkobrain Co-authored-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-11-02exclude more CI files from crates.ioIgor Gnatenko
2018-11-02Merge #961bors[bot]
961: Add sync (fix #959) r=asomers a=r-darwish Co-authored-by: Roey Darwish Dror <roey.ghost@gmail.com>
2018-11-02Add sync (fix #959)Roey Darwish Dror
2018-10-30Merge #958bors[bot]
958: Added AddressType type to ptrace::linux + peek/poke user fix r=asomers a=xd009642 This was added to the BSD ptrace API and probably should have been added to the linux API to make it easier to write code for both platforms without the user having to reexport the types to their own crate. I went to use the latest nix myself and found that having this added would improve usability for nix users. Could potentially add a type for what they return (BSDs: `c_int`, linux: `c_long`). Data input might be trickier as linux is `*mut c_void` and BSD just takes data as `c_int`. Co-authored-by: xd009642 <danielmckenna93@gmail.com>
2018-10-28Removed Peek and poke user from unsupportedOpxd009642
2018-10-24Added AddressType typexd009642
This was added to the BSD ptrace API and probably should have been added to tyhe linux API to make it easier to write code for both platforms without the user having to reexport the types to their own crate.
2018-10-24Merge #952bors[bot]
952: Add wrapper for acct(2) r=asomers a=jabedude This PR aims to add a nix wrapper for acct(2). Co-authored-by: Josh Abraham <sinisterpatrician@gmail.com>
2018-10-21Add acct(2) wrapper APIJosh Abraham
This patch adds a wrapper for the acct(2) syscall, with two functions for enabling and disabling process accounting.
2018-10-21Merge #949bors[bot]
949: ptrace support for BSDs r=Susurrus a=xd009642 This PR adds support to the ptrace API for BSDs to close #947. It also adds a read and write method for reading and writing to a traced processes memory. The ptrace API created for linux offers this via a deprecated function so I added this so they can be feature equivalent without replicating a deprecated part of the API. Due to the differences in ptrace on BSD and linux I've made a ptrace module to keep things readable. Still to do - revert travis config to remove my feature branch and update the changelog. Co-authored-by: xd009642 <danielmckenna93@gmail.com>
2018-10-21Added ptrace support for BSDsxd009642
* Moved ptrace API into it's own module with cfg'ed modules exported for linux/android or BSDs. * Replicated current linux API for BSD * Added API functions to peek and poke memory to avoid needing to replicate deprecated linux API and remaining feature complete * Added helper function for `PTRACE_KILL` requests * Updated tests based on new API changes * Added addition kill calls to `test_ptrace_cont` as inferior death doesn't happen immediately on OSX which caused issues in the tests.