summaryrefslogtreecommitdiff
path: root/src/sys/wait.rs
AgeCommit message (Collapse)Author
2022-03-09wait: implement waitid()Matthias Schiffer
waitid() has a number of additional features that waitpid() is missing: - WNOWAIT is only accepted for waitid() on Linux (and possibly other platforms) - Support for waiting on PID file descriptors on Linux For now support is added for all platforms with waitid() that have proper siginfo_t support in libc. NetBSD support is currently a work in progress [1]. Tests for the signal/exit code are currently skipped on MIPS platforms due to bugs in qemu-user's translation of siginfo_t (fixed in [2] and [3]; the second fix is not in a released qemu version yet). [1] https://github.com/rust-lang/libc/pull/2476 [2] https://lists.nongnu.org/archive/html/qemu-devel/2021-01/msg04810.html [3] https://lists.nongnu.org/archive/html/qemu-devel/2021-10/msg05433.html
2021-12-20feature-gate most Nix functionsVincent Dagonneau
Using features reduces build time and size for consumer crates. By default all features are enabled.
2021-09-04Document more thingsAlan Somers
Also, test rustdoc in CI, and demote missing_docs from a deny to a warning (but still deny it in CI).
2021-05-13Use https instead of httpRyan Zoeller
2021-02-14fix(unsafe): remove unnecessary unsafeJan Philipp Hafer
closes #1380 libc 0.2.82 exposes status signals with macros generating safe functions
2021-02-14cargo formatJan Philipp Hafer
2020-09-13Adapt for safe-isation of some libc functions.Vitaly _Vi Shukela
(https://github.com/rust-lang/libc/pull/1870) Denied lint being overridden instead of unsafe block removed to preserve compatibility with old `libc` versions.
2020-05-31Convert the crate to edition 2018Alan Somers
2020-05-17Add Redox support for most of the modulesXavier L'Heureux
Some things are not implemented yet in redox, so a lot of annotations were added to remove functions when compiling for redox. Those functions will hopefully be added in time, but for now it's better to have partial support than none. Blocked by https://github.com/rust-lang/libc/pull/1438
2019-09-04Replace Signal::from_c_int by Signal::try_fromAlan Somers
TryFrom wasn't stable when that function was written.
2019-08-29Clippy cleanupAlan Somers
2019-06-09Add extra traits for all typesBryant Mairs
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.
2018-12-08Replace try! with ?Alan Somers
try! is not available in Rust 2018
2018-01-28Fail to compile for any unused codeBryant Mairs
2017-12-20Merge redundant match armsBryant Mairs
2017-12-09Merge #741bors[bot]
741: Expose `decode` on `WaitStatus` and make it return a `Result` r=Susurrus a=rocallahan Closes #740.
2017-12-05Expose `from_raw` on `WaitStatus` and make it return a `Result`Robert O'Callahan
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-11-11Formatting with rustfmtWilliam Orr
2017-11-11Omit invalid waitpid flags on OpenBSDWilliam Orr
OpenBSD doesn't have `WEXITED`, `WSTOPPED`, or `WNOWAIT`, so omit those from that platform.
2017-08-21Use libc definitions for wait moduleBryant Mairs
2017-08-16Match libc_bitflags! syntax to upstream bitflags!Bryant Mairs
2017-08-08Add a convenience method .pid() to WaitStatus.Marcin Mielniczuk
2017-07-21Document WaitStatus and its variantsGeoffrey Thomas
2017-07-21Add WaitStatus::PtraceSyscall for use with PTRACE_O_TRACESYSGOODGeoffrey Thomas
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
2017-07-02Newtypes for uid_t, gid_t and pid_t.Martin Habovštiak
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
2016-11-05Use cfg_if to branch code in WaitStatus decodeDavid Hou
2016-10-16Attempt to fix build for non-{android,linux} platformsDavid Hou
2016-10-16wait: Support ptrace events for LinuxDavid Hou
2016-07-01Auto merge of #379 - nikklassen:wait-flags, r=fiveopHomu
Add missing wait flag WUNTRACED for non-Linux systems My understanding is that this flag is required by POSIX, so all systems should allow for it
2016-06-29Replace wait constants with libc constantsNik Klassen
2016-06-26Convert signal constants to enumeration.Philipp Matthias Schaefer
2016-06-10Add missing wait flag WUNTRACED for non-Linux systemsNik Klassen
2016-01-28Move errno::Result back to crate rootarcnmx
2016-01-28Errno::result()arcnmx
2015-12-03support more flags to waitpid and wait on linuxDavid Roundy
2015-11-20netbsd supportJeremy Fitzhardinge
2015-07-13Add status to WaitStatusJoseph Kain
* Extend the enums in WaitStatus to include all process states (signaled, stopped, exited, continued). * Decode status from waitpid * Return appropate WaitStatus * Update tests to use the new WaitStatus * Add new tests for specific status values
2015-06-08added wait system call and unit testMarkus Jais
2015-04-03'derive(Copy)' needs Clone nowFlorian Hartwig
2015-03-24NixResult -> nix::Result; NixError -> nix::ErrorCarl Lerche
2015-02-10Add `NixPath`, `NixError`, and `NixResult`.Utkarsh Kukreti
2015-02-01Changed options parameter for waitpid to Option<WaitPidFlag>Markus Jais
2015-01-03Update to rust masterValerii Hiora
- cstr fallout - deriving -> derive - lib stabilization warnings removal
2014-12-18Add all now needed ';' after macro invocations.Victor Berger
2014-12-15bitflags! derives Copy for you now, so remove our derivings.Jonathan Reem
2014-12-10Fallout of Copy becoming opt-in.Victor Berger
2014-11-19Use namespaced enum variants.Roma Sokolov
As per this pull request https://github.com/rust-lang/rust/pull/18973, enum variants require fully qualified path to access them. This commit introduces boring changes to make nix-rust compiles againts new rust.