diff options
author | Homu <homu@barosl.com> | 2016-07-01 16:53:38 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-07-01 16:53:38 +0900 |
commit | a869f5c6cd2d73e500e5a46a3daf50b6c4d443d1 (patch) | |
tree | 0cc7d68ea7415218caa5d2b9b610055d8fee4749 /src/sys | |
parent | 3e4384990946f199f91afa57493ba372276d1f66 (diff) | |
parent | 8fb0c51e59d31429ffa871a28028876792cdd9c4 (diff) | |
download | nix-a869f5c6cd2d73e500e5a46a3daf50b6c4d443d1.zip |
Auto merge of #379 - nikklassen:wait-flags, r=fiveop
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
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/wait.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/sys/wait.rs b/src/sys/wait.rs index 80a8acaa..259efb70 100644 --- a/src/sys/wait.rs +++ b/src/sys/wait.rs @@ -1,4 +1,4 @@ -use libc::{pid_t, c_int}; +use libc::{self, pid_t, c_int}; use {Errno, Result}; use sys::signal::Signal; @@ -15,7 +15,8 @@ mod ffi { target_os = "android")))] bitflags!( flags WaitPidFlag: c_int { - const WNOHANG = 0x00000001, + const WNOHANG = libc::WNOHANG, + const WUNTRACED = libc::WUNTRACED, } ); @@ -23,14 +24,14 @@ bitflags!( target_os = "android"))] bitflags!( flags WaitPidFlag: c_int { - const WNOHANG = 0x00000001, - const WUNTRACED = 0x00000002, - const WEXITED = 0x00000004, - const WCONTINUED = 0x00000008, - const WNOWAIT = 0x01000000, // Don't reap, just poll status. - const __WNOTHREAD = 0x20000000, // Don't wait on children of other threads in this group - const __WALL = 0x40000000, // Wait on all children, regardless of type - // const __WCLONE = 0x80000000, + const WNOHANG = libc::WNOHANG, + const WUNTRACED = libc::WUNTRACED, + const WEXITED = libc::WEXITED, + const WCONTINUED = libc::WCONTINUED, + const WNOWAIT = libc::WNOWAIT, // Don't reap, just poll status. + const __WNOTHREAD = libc::__WNOTHREAD, // Don't wait on children of other threads in this group + const __WALL = libc::__WALL, // Wait on all children, regardless of type + const __WCLONE = libc::__WCLONE, } ); |