Age | Commit message (Collapse) | Author |
|
Most could be replaced by simple raw pointer casts (or even perfectly
safe coercions!).
cc #373
|
|
729: Refactor statvfs module r=Susurrus
* 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
|
|
* 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
|
|
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.
|
|
722: Add a convenience method .pid() for WaitStatus. r=asomers
|
|
|
|
721: Enable setresuid/setresgid on FreeBSD and OpenBSD r=asomers
Fixes #717
This PR enables `setresuid` and `setresgid` on FreeBSD and OpenBSD. These functions are not present on NetBSD, macOS, and iOS as far as I can tell.
|
|
|
|
|
|
Also updates cmsg types to match structs on non-Linux OSes.
The implementation of CmsgInterator did not correctly mirror the
way the CMSG_FIRSTHDR and CMSG_NEXTHDR macros work in C. CMSG_FIRSTHDR
does not attempt to align access since the pointer is already aligned
due to being part of the msghdr struct.
CmsgInterator was always aligning access which happened to work on all
platforms except OpenBSD where the use of alignment was adding
unexpected bytes to the expected size and causing the
`cmsg_align(cmsg_len) > self.buf.len()` guard clause to return early.
|
|
There appears to be some interaction with test_pathconf_limited and
another one when they are run in parallel, causing it to return ENOENT
so the path has been changed from . to /.
|
|
|
|
|
|
716: Fix changelog from bad merge r=Susurrus
Missed this when merging #672.
|
|
|
|
647: merge socket constants r=Susurrus
> Refactor the constant declarations such that all constants are only declared once with a #[cfg] that only enables the constant on the correct platforms.
Closes #637
(same PR as #646 but from another branch, to see if buildbot has a problem with PR made from master branch)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
672: add poll module in Android r=Susurrus
`poll` functions are defined in Android as well.
libc is missing some constant, but once rust-lang/libc#663 is merged, it'll be good to merge here.
Closes #711
|
|
|
|
713: Move i686-unknown-freebsd builds from Travis to BuildBot r=asomers
|
|
|
|
712: Change the FreeBSD builder's name to "amd64_fbsd11" r=asomers
|
|
|
|
|
|
692: Rename the public ptrace_* functions. r=Susurrus
Unlike in C, we have namespacing in Rust. Renaming the functions allows us to avoid a `use nix::sys::ptrace::*` in favor of `use nix::sys::ptrace` and then calling, for example, `ptrace::traceme()`
I'm wondering if we should rename the private functions too...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These are assumed to be QEMU issues, as they also fail on mips.
|
|
When tests are run in QEMU the job just times out
|
|
|
|
|
|
|
|
|
|
Note that ptrace isn't documented as signal-safe, but it's supposed to
just be a light syscall wrapper, so it should be fine.
|
|
|
|
Some tests were invoking non-async-signal-safe functions from the child
process after a `fork`. Since they might be invoked in parallel, this
could lead to problems.
|
|
|
|
|
|
|
|
The recommended way to trace syscalls with ptrace is to set the
PTRACE_O_TRACESYSGOOD option, to distinguish syscall stops from
receiving an actual SIGTRAP. In C, this would cause WSTOPSIG to return
SIGTRAP | 0x80, but nix wants to parse that as an actual signal.
Add another wait status type for syscall stops (in the language of the
ptrace(2) manpage, "PTRACE_EVENT stops" and "Syscall-stops" are
different things), and mask out bit 0x80 from signals before trying to
parse it.
Closes #550
|
|
|