#ifndef _WAIT_H #define _WAIT_H #ifndef _COMPILER_H #include #endif #ifdef __cplusplus extern "C" { #endif struct __wait { #ifndef __MSHORT__ unsigned junk:16; /* padding to make it 32 bits */ #endif unsigned retcode:8; unsigned coredump:1; unsigned termsig:7; }; union wait { struct __wait _w; int _i; }; #define w_termsig _w.termsig #define w_stopsig _w.retcode #define w_coredump _w.coredump #define w_retcode _w.retcode /* I don't know if this next one is right or not */ #define w_status _i #define WSTOPPED 0177 /* fake "signal" for stopped processes */ #define WIFSIGNALED(x) ((x)._w.termsig != 0) #define WIFSTOPPED(x) ((x)._w.termsig == WSTOPPED) #define WIFEXITED(x) ((x)._w.termsig == 0) #define WNOHANG 1 #define WUNTRACED 2 #ifdef __cplusplus } #endif #endif