summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-09-04Add support for SO_TIMESTAMPWesley Wolfe
2017-09-03Fixed error handling in `AioCb::{fsync,read,write}`Alan Somers
Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes #714
2017-09-03AioCb::Drop will now panic for in-progress AioCbAlan Somers
Printing a warning message to stderr isn't really appropriate, because there's no way to guarantee that stderr is even valid. Nor is aio_suspend necessarily an appropriate action to take.
2017-09-03Merge #746bors[bot]
746: Replace socket FFI with libc versions r=asomers a=Susurrus Getting this up there to get some CI run on it. Replacing the `msghdr`, `cmsghdr`, and other FFI function declarations will be a little more involved so I wanted to run this through first.
2017-09-01Merge #750bors[bot]
750: Migrate quota module to libc FFI types r=asomers a=Susurrus
2017-08-29Migrate quota module to libc FFI typesBryant Mairs
2017-08-30Merge #745bors[bot]
745: Use upstream libc definitions for fcntl FFI r=asomers a=Susurrus
2017-08-29Use upstream libc definitions for fcntl FFIBryant Mairs
2017-08-28Merge #749bors[bot]
749: Moved ptrace constants into enum types plus minor additions r=Susurrus a=xd009642 Reopening of #734 hence the branch name, changelog will be updated once the pr number of this new pull request is known.
2017-08-28Added detach functionxd009642
2017-08-28Moved ptrace constants into enum types added minor functionality.xd009642
Used the libc_enum! macro to create enums for the ptrace event, request, and libc_bitflags for options constants defined in libc. Also, replicated functionality to move from c_int to PtraceEvent enum in PR #728 as it appears to be abandoned. Added utility function for detaching from tracee. Updated names and removed ptrace::ptrace namespace
2017-08-27Remove syscall module.Bryant Mairs
This module merely contained FFI declarations, and only enough to implement memfd_create() and pivot_root() wrapper functions in nix. Since these declarations are redundant with equivalent FFI declarations in libc, we'll remove them here. In the future, any syscall-related wrapper function will be implemented directly and utilize libc for FFI declarations as we cannot generically expose a type-safe `syscall()` because of its variadic argument list.
2017-08-27Support casting values in libc_enum!Bryant Mairs
2017-08-26Use libc types for sched FFIBryant Mairs
2017-08-26Replace more FFI instancesBryant Mairs
2017-08-25Merge #744bors[bot]
744: Mark and document pty::ptsname() as unsafe r=asomers a=nelsonjchen On some platforms, `ptsname()` mutates global variables and mutating global variables is always considered `unsafe` by Rust. Reference: https://github.com/nix-rust/nix/pull/742#issuecomment-324385919
2017-08-25Merge #732bors[bot]
732: Use libc definitions for wait module r=Susurrus a=Susurrus Not certain if these are all correct yet, but we can reuse a ton of logic from `libc` within the `wait` module.
2017-08-24Mark and document pty::ptsname() as unsafeNelson Chen
`ptsname()` mutates global variables and mutating global variables is always considered `unsafe` by Rust. Reference: https://github.com/nix-rust/nix/pull/742#issuecomment-324385919
2017-08-21Use libc definitions for wait moduleBryant Mairs
2017-08-21Expose signalfd on AndroidBryant Mairs
2017-08-21Log sendfile as missing for some BSDsBryant Mairs
2017-08-21Expose utsname on all platformsBryant Mairs
2017-08-18unistd: add fexecve()Luca Bruno
This adds fexecve() to `nix::unistd`. It is available in libc since 0.2.29. Ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
2017-08-17Merge #725bors[bot]
725: Match syntax of libc_bitflags! with bitflags! r=asomers Also update a couple of constant declarations while we're at it.
2017-08-17Merge #700bors[bot]
700: Get rid of a lot of transmutes r=asomers Most could be replaced by simple raw pointer casts (or even perfectly safe coercions!). cc #373
2017-08-16Remove ugly libc_bitflags hack for mac/ios.Bryant Mairs
2017-08-16Replace ffi constants with libc in epollBryant Mairs
2017-08-16Replace ffi declarations for selectBryant Mairs
2017-08-16Use libc::uname and libc::utsnameBryant Mairs
2017-08-16Use libc::quotactlBryant Mairs
2017-08-16Use libc_bitflags for stat::ModeBryant Mairs
2017-08-16Match libc_bitflags! syntax to upstream bitflags!Bryant Mairs
2017-08-16Replace extra SOCK_ constants with libc versionsBryant Mairs
Fixes #244
2017-08-15Merge pull request #730 from ncaracci/whenceAlan Somers
Documentation for Whence.
2017-08-14Added documentation to Whence.Nicolás Caracci
Changed SeekData and SeekHole hardcoded values to libc ones and added availability only to linux freebsd and dragonflybsd. Removed impl Whence and assigned the libc values directly in the enum definition.
2017-08-11Merge #728 #731bors[bot]
728: Use upstream libc ptrace FFI r=Susurrus This might fail on Mac because of how libc defines ptrace on that platform, but we'll see! 731: Use upstream libc definitions in mman module r=asomers
2017-08-11Use upstream libc ptrace FFIBryant Mairs
2017-08-11Merge #701bors[bot]
701: Calculate `nfds` parameter for `select` r=asomers Doing this behind the scenes makes the API less error-prone and easier to use. It should also fix my issue in https://github.com/nix-rust/nix/issues/679#issuecomment-316838148
2017-08-11Use libc for FFI functions and constantsBryant Mairs
2017-08-11Fix safety of sockopt helper traitsJonas Schievink
2017-08-11Get rid of a lot of transmutesJonas Schievink
Most could be replaced by simple raw pointer casts (or even perfectly safe coercions!). cc #373
2017-08-11Calculate `nfds` parameter for `select`Jonas Schievink
Doing this behind the scenes makes the API less error-prone and easier to use. It should also fix https://github.com/nix-rust/nix/issues/679#issuecomment-316838148
2017-08-11Merge #709bors[bot]
709: Mark nix::sys::ptrace::ptrace as unsafe, add safe variants of some routines r=Susurrus These include: * PTRACE_TRACEME * PTRACE_CONT * PTRACE_ATTACH * PTRACE_SYSCALL This is a part of #666, which is being split up into a couple smaller PRs.
2017-08-10Refactor statvfs moduleBryant Mairs
* Use upstream libc FFI declarations and constants * Use more Rust-y interface of returning entire struct versus passing it as an argument to (f)statvfs. * Replace field accesses with accessor methods * Flatten vfs module into parent * Remove all non-libc-based interfaces for working with the statvfs struct
2017-08-10Remove the incorrect doc comment.Marcin Mielniczuk
2017-08-10Merge remote-tracking branch 'upstream/master' into ptrace-noregMarcin Mielniczuk
2017-08-10Deprecate `ptrace`.Marcin Mielniczuk
2017-08-09Merge #688bors[bot]
688: Support for OpenBSD r=Susurrus Fixes #685 These changes get nix building on OpenBSD 6.1. There is one failing test that I want a little guidance on: ``` error[E0308]: mismatched types --> src/sys/event.rs:333:30 | 333 | assert!(expected.data == actual.data()); | ^^^^^^^^^^^^^ expected i64, found isize ``` `KEvent::data` is: ``` pub fn data(&self) -> intptr_t { self.kevent.data as intptr_t } ``` I assume the test should be updated to cast to the expected type but wanted to confirm that before making the change.
2017-08-08Merge #722bors[bot]
722: Add a convenience method .pid() for WaitStatus. r=asomers
2017-08-08Add a convenience method .pid() to WaitStatus.Marcin Mielniczuk