summaryrefslogtreecommitdiff
path: root/src/sys/signal.rs
AgeCommit message (Collapse)Author
2019-01-13Implement nix wrapper for libc::signalRobert Gardner
Closes #476
2018-12-08Replace try! with ?Alan Somers
try! is not available in Rust 2018
2018-12-01Fix missing SIGSTKFLT on sparc64-linuxBryant Mairs
2018-09-05Merge #884bors[bot]
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>
2018-09-04impl FromStr and Display for sys::SignalBrandon W Maister
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.
2018-05-05Add documentation to signal-handling functionsRoss Light
2018-03-02Change SigAction::flags to use from_bits_truncatedAntti Keränen
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.
2018-01-28Require Debug impls for all typesBryant Mairs
2018-01-28Implement Copy/Clone for all types missing itBryant Mairs
2018-01-06Add sigprocmaskThomas de Zeeuw
2017-12-20Replace boolean match with if/elseBryant Mairs
2017-12-20Don't clone Copy typesBryant Mairs
2017-12-20Remove redundant closureBryant Mairs
2017-12-20Use backticks around types/functions in docsBryant Mairs
2017-12-20Dereference in match head insteadBryant Mairs
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-12-02Upgrade to Bitflags 1.0Bryant Mairs
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.
2017-11-11Alphabetize some target_os configurationsWolfgang Ginolas
2017-11-05Use libc_enum! where possibleWolfgang Ginolas
Some enums which use different names for values than libc still set the discriminators manually. closes #254
2017-10-08Replace most Linux man page links with Open Group man page linksAlan Somers
But leave in place Linux links for non-standard functions. Also, add brief docs for some functions that were lacking them.
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-16Match libc_bitflags! syntax to upstream bitflags!Bryant Mairs
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-05Add OpenBSD compatibility to signalsWesley Moore
2017-07-19Remove c_int and c_void from rootBryant Mairs
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
2017-07-08SIGSTKFLT doesn't exist on Linux/GNU/mips(64)Bryant Mairs
2017-07-04Allow nix to compile on android targetsroblabla
2017-07-02Newtypes for uid_t, gid_t and pid_t.Martin Habovštiak
2017-06-01Add SigAction gettersHenning Ottesen
* SigAction::flags() * SigAction::mask() * SigAction::handler()
2017-02-27Auto merge of #506 - asomers:aio3, r=posborneHomu
Improve AIO API - Turn most `aio_*` functions into `AioCb` methods - Add runtime checks to `AioCb` methods - Implement `Drop` for `AioCb`
2017-02-25Remove EPOLLWAKEUP and SIGEV_THREAD_ID when cross-compiling to MIPS.Johan Anderholm
2017-02-24impl Debug for AioCb and SigevNotifyAlan Somers
Also, fix style bug in AIO tests
2017-02-23Auto merge of #503 - Idolf:bitflags, r=kamalmarhubiHomu
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.
2017-02-23Auto merge of #513 - yxd-hde:fix-musl, r=posborneHomu
Fix unresolved name error when building with musl. See: https://git.musl-libc.org/cgit/musl/tree/src/time/timer_create.c#n126
2017-02-19Fix the style for bitflags!Mathias Svensson
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually.
2017-02-16Update bitflags to 0.7Simon Sapin
2017-02-16Fix unresolved name error when building with musl.YANG Xudong
2016-12-16Add POSIX AIO supportAlan Somers
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
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-14Make signal argument to kill optionalPhilipp Matthias Schaefer
2016-11-08Rename SigFlags to SigmaskHowDavid Hou
2016-11-06Add some tests for sys::signal.David Hou
2016-11-06Change SigFlags into an enum.David Hou
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-09-17Removes SIGSTKFLT when cross-compiling to MIPS.Tim Ryan
2016-07-18Fix NetBSD buildTobias Bucher
2016-06-26Convert signal constants to enumeration.Philipp Matthias Schaefer
2016-05-06Add missing signals.Philipp Matthias Schaefer
2016-04-22Add SigSet::extend and SigSet::clear.Philipp Matthias Schaefer
2016-04-02Fix raw_pointer_derive warningKamal Marhubi
This commit adds a small build script to detect if we need to `#[allow(raw_pointer_derive)]` and makes the attribute conditional. Refs #337