1 /* Wrapper around the ugly sys/wait includes/ifdefs */
4 /* Get rid of system macros (which probably use union wait) */
15 #define WIFCORED(s) ((s) & 0x80)
16 #define WSTATUS(s) (s)
18 #define WIFEXITED(s) (((s) & 0xff) == 0)
19 #define WEXITSTATUS(s) (((s) >> 8) & 0xff)
20 #define WIFSIGNALED(s) (((s) & 0xff) != 0 && ((s) & 0xff) != 0x7f)
21 #define WTERMSIG(s) ((s) & 0x7f)
22 #define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
23 #define WSTOPSIG(s) (((s) >> 8) & 0xff)
25 #define ksh_waitpid(p, s, o) waitpid((p), (s), (o))