Age | Commit message (Collapse) | Author |
|
|
|
TryFrom wasn't stable when that function was written.
|
|
Only two instances remain:
* For the deprecated sys::socket::CmsgSpace::new. We should probably
just remove that method.
* For sys::termios::Termios::default_uninit. This will require some
more thought.
Fixes #1096
|
|
|
|
Derive Clone, Copy, Eq, Hash, and PartialEq for all types. Not all
traits are supported by all types, which is why many are missing
some.
|
|
libc just changed the signedness of sigaction.sa_flags for Android.
https://github.com/rust-lang/libc/commit/841b3eb01644283c3c41ac1d1a2ddcec141f15f2
|
|
|
|
It was disabled long ago and nobody remembered to reenable it. I'm
guessing it's fixed by now.
|
|
|
|
Previous versions of Cargo would create and destroy a new thread for
each test. Cargo 1.33.0 instead creates a thread pool and reuses the
same thread for multiple tests. Some Nix tests that changed the
per-thread sigmask began to fail as a result, because they didn't do any
cleanup.
The easiest solution is to spawn a new thread for each of those tests.
|
|
Closes #476
|
|
try! is not available in Rust 2018
|
|
|
|
884: impl FromStr for sys::Signal r=Susurrus a=quodlibetor
This implements both ALLCAPS and lowercase full name (including SIG) and short
name.
This matches what `kill` accepts in many shells, and it also allows the `Debug`
representation of `Signal`, which means it can be round-tripped, if desired.
Co-authored-by: Brandon W Maister <quodlibetor@gmail.com>
|
|
This is a subset of what `kill` accepts in many shells. The Display
implementation matches the `Debug` representation of `Signal`.
The `FromStr` matches both Debug/Display which means it can be round-tripped,
if desired.
|
|
|
|
On Linux, if the signal trampoline code is in the C library, sigaction
sets the SA_RESTORER flag (0x04000000) in the sa_flags field of old
sigaction (see sigreturn(2)).
This is not intended for application use and is missing from SaFlags,
therefore from_bits fails and unwrapping panics the user program.
This fix just drops the bits that are not defined in SaFlags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cc #664 (unsure if this is everything needed)
|
|
The libc_bitflags! macro was replaced with a non-recursive one supporting
only public structs. I could not figure out how to make the old macro work
with the upgrade, so I reworked part of the bitflags! macro directly to suit
our needs, much as the original recursive macro was made. There are no uses
of this macro for non-public structs, so this is not a problem for internal code.
|
|
|
|
Some enums which use different names for values than libc still set the
discriminators manually.
closes #254
|
|
But leave in place Linux links for non-standard functions. Also, add
brief docs for some functions that were lacking them.
|
|
725: Match syntax of libc_bitflags! with bitflags! r=asomers
Also update a couple of constant declarations while we're at it.
|
|
|
|
Most could be replaced by simple raw pointer casts (or even perfectly
safe coercions!).
cc #373
|
|
|
|
These were exported for some weird reason and then left in
for documentation. Also some parts of certain modules used
them and others used the libc:: prefix. This was removed to
improve the docs and also code consistency
|
|
|
|
|
|
|
|
* SigAction::flags()
* SigAction::mask()
* SigAction::handler()
|
|
Improve AIO API
- Turn most `aio_*` functions into `AioCb` methods
- Add runtime checks to `AioCb` methods
- Implement `Drop` for `AioCb`
|
|
|
|
Also, fix style bug in AIO tests
|
|
Fix the style for bitflags!
Prefer `libc_bitflags!` over `bitflags!`. Prefer `libc::CONSTANTS` over
writing the constant manually.
This makes #501 unnecessary, since upstream now contains the `O_TMPFILE` constant.
|
|
Fix unresolved name error when building with musl.
See: https://git.musl-libc.org/cgit/musl/tree/src/time/timer_create.c#n126
|
|
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over
writing the constant manually.
|
|
|
|
|
|
POSIX AIO is a standard for asynchronous file I/O. Read, write, and
fsync operations can all take place in the background, with completion
notification delivered by a signal, by a new thread, by kqueue, or not
at all. This commit supports all standard AIO functions. However,
lio_listio is disabled on macos because it doesn't seem to work, even
though the syscall is present.
The SigEvent class, used for AIO notifications among other things, is
also added.
Also, impl AsRef for TimeVal and TimeSpec
|
|
Change SigFlags into an enum.
Addresses #459.
This is a breaking change.
Should SigFlags be renamed to something more sensible?
|
|
|