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
41 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
42 #define WTERMSIG(s) ((s) & 0x7f)
43 #define WSTOPSIG(s) WEXITSTATUS(s)
44 #define WCOREDUMP(s) ((s) & 0x80)
45 #define WIFEXITED(s) (!WTERMSIG(s))
46 #define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
47 #define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0)
48 #define WIFCONTINUED(s) ((s) == 0xffff)