13 #define __NEED_siginfo_t
14 #include <bits/alltypes.h>
19 int waitid (idtype_t, id_t, siginfo_t *, int);
20 pid_t waitpid (pid_t, int *, int );
22 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
23 #include <sys/resource.h>
24 pid_t wait3 (int *, int, struct rusage *);
25 pid_t wait4 (pid_t, int *, int, struct rusage *);
34 #define WNOWAIT 0x1000000
36 #define __WNOTHREAD 0x20000000
37 #define __WALL 0x40000000
38 #define __WCLONE 0x80000000
44 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
45 #define WTERMSIG(s) ((s) & 0x7f)
46 #define WSTOPSIG(s) WEXITSTATUS(s)
47 #define WCOREDUMP(s) ((s) & 0x80)
48 #define WIFEXITED(s) (!WTERMSIG(s))
49 #define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
50 #define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0)
51 #define WIFCONTINUED(s) ((s) == 0xffff)