Skip to content

Commit

Permalink
Replace wait constants with libc constants
Browse files Browse the repository at this point in the history
  • Loading branch information
nikklassen committed Jun 29, 2016
1 parent 6721891 commit 8fb0c51
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/sys/wait.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use libc::{pid_t, c_int};
use libc::{self, pid_t, c_int};
use {Errno, Result};

use sys::signal;
Expand All @@ -15,23 +15,23 @@ mod ffi {
target_os = "android")))]
bitflags!(
flags WaitPidFlag: c_int {
const WNOHANG = 0x00000001,
const WUNTRACED = 0x00000002,
const WNOHANG = libc::WNOHANG,
const WUNTRACED = libc::WUNTRACED,
}
);

#[cfg(any(target_os = "linux",
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,
}
);

Expand Down

0 comments on commit 8fb0c51

Please sign in to comment.