diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index c7997ef5..967acc7e 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -271,6 +271,10 @@ pub const NOFLSH: ::tcflag_t = 0x80000000; pub const WNOHANG: ::c_int = 0x00000001; pub const WUNTRACED: ::c_int = 0x00000002; +pub const WEXITED: ::c_int = 0x00000004; +pub const WSTOPPED: ::c_int = 0x00000008; +pub const WCONTINUED: ::c_int = 0x00000010; +pub const WNOWAIT: ::c_int = 0x00000020; pub const RTLD_NOW: ::c_int = 0x2; pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void; diff --git a/src/unix/mod.rs b/src/unix/mod.rs index f88ed6dc..222da5c7 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -16,6 +16,13 @@ pub type cc_t = ::c_uchar; pub enum DIR {} pub enum locale_t {} +#[repr(C)] +pub enum idtype_t { + P_ALL = 0, + P_PID = 1, + P_PGID = 2, +} + s! { pub struct group { pub gr_name: *mut ::c_char, @@ -447,6 +454,8 @@ extern { link_name = "waitpid$UNIX2003")] pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int) -> pid_t; + pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, + options: ::c_int) -> ::c_int; #[cfg_attr(all(target_os = "macos", target_arch = "x86"), link_name = "write$UNIX2003")] pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)