11 #include <bits/alltypes.h>
20 pid_t
waitpid (pid_t
, int *, int );
22 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
23 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
24 || defined(_BSD_SOURCE)
26 int waitid (idtype_t
, id_t
, siginfo_t
*, int);
29 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
30 #include <sys/resource.h>
31 pid_t
wait3 (int *, int, struct rusage
*);
32 pid_t
wait4 (pid_t
, int *, int, struct rusage
*);
41 #define WNOWAIT 0x1000000
43 #define __WNOTHREAD 0x20000000
44 #define __WALL 0x40000000
45 #define __WCLONE 0x80000000
47 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
48 #define WTERMSIG(s) ((s) & 0x7f)
49 #define WSTOPSIG(s) WEXITSTATUS(s)
50 #define WCOREDUMP(s) ((s) & 0x80)
51 #define WIFEXITED(s) (!WTERMSIG(s))
52 #define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00)
53 #define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
54 #define WIFCONTINUED(s) ((s) == 0xffff)
57 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
58 __REDIR(wait3
, __wait3_time64
);
59 __REDIR(wait4
, __wait4_time64
);