13 #include <bits/alltypes.h>
22 int waitid (idtype_t, id_t, siginfo_t *, int);
23 pid_t waitpid (pid_t, int *, int );
25 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
26 #include <sys/resource.h>
27 pid_t wait3 (int *, int, struct rusage *);
28 pid_t wait4 (pid_t, int *, int, struct rusage *);
37 #define WNOWAIT 0x1000000
39 #define __WNOTHREAD 0x20000000
40 #define __WALL 0x40000000
41 #define __WCLONE 0x80000000
43 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
44 #define WTERMSIG(s) ((s) & 0x7f)
45 #define WSTOPSIG(s) WEXITSTATUS(s)
46 #define WCOREDUMP(s) ((s) & 0x80)
47 #define WIFEXITED(s) (!WTERMSIG(s))
48 #define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00)
49 #define WIFSIGNALED(s) (((s)&0xffff)-1 < 0xffu)
50 #define WIFCONTINUED(s) ((s) == 0xffff)