1
- use libc:: { pid_t, c_int} ;
1
+ use libc:: { self , pid_t, c_int} ;
2
2
use { Errno , Result } ;
3
3
4
4
use sys:: signal:: Signal ;
@@ -15,22 +15,23 @@ mod ffi {
15
15
target_os = "android" ) ) ) ]
16
16
bitflags ! (
17
17
flags WaitPidFlag : c_int {
18
- const WNOHANG = 0x00000001 ,
18
+ const WNOHANG = libc:: WNOHANG ,
19
+ const WUNTRACED = libc:: WUNTRACED ,
19
20
}
20
21
) ;
21
22
22
23
#[ cfg( any( target_os = "linux" ,
23
24
target_os = "android" ) ) ]
24
25
bitflags ! (
25
26
flags WaitPidFlag : c_int {
26
- const WNOHANG = 0x00000001 ,
27
- const WUNTRACED = 0x00000002 ,
28
- const WEXITED = 0x00000004 ,
29
- const WCONTINUED = 0x00000008 ,
30
- const WNOWAIT = 0x01000000 , // Don't reap, just poll status.
31
- const __WNOTHREAD = 0x20000000 , // Don't wait on children of other threads in this group
32
- const __WALL = 0x40000000 , // Wait on all children, regardless of type
33
- // const __WCLONE = 0x80000000 ,
27
+ const WNOHANG = libc :: WNOHANG ,
28
+ const WUNTRACED = libc :: WUNTRACED ,
29
+ const WEXITED = libc :: WEXITED ,
30
+ const WCONTINUED = libc :: WCONTINUED ,
31
+ const WNOWAIT = libc :: WNOWAIT , // Don't reap, just poll status.
32
+ const __WNOTHREAD = libc :: __WNOTHREAD , // Don't wait on children of other threads in this group
33
+ const __WALL = libc :: __WALL , // Wait on all children, regardless of type
34
+ const __WCLONE = libc :: __WCLONE ,
34
35
}
35
36
) ;
36
37
0 commit comments