
#define  _W_STOPPED  0x00000040  /* bit set if stopped      */

/* evaluates to a non-zero value if status returned for a stopped child	*/
#undef WIFSTOPPED
#define	WIFSTOPPED(x)	((x) & _W_STOPPED )
/* evaluates to the number of the signal that caused the child to stop	*/
#undef WSTOPSIG
#define	WSTOPSIG(x)	(int)(WIFSTOPPED(x) ? (((x) >> 8) & 0x7f) : -1)
/* evaluates to a non-zero value if status returned for normal termination */
#undef WIFEXITED
#define	WIFEXITED(x)	( !((x) & 0xff) )
/* evaluates to the low-order 8 bits of the child exit status	*/
#undef WEXITSTATUS
#define	WEXITSTATUS(x)	(int)(WIFEXITED(x) ? (((x) >> 8) & 0xff) : -1)
/* evaluates to a non-zero value if status returned for abnormal termination */
#undef WIFSIGNALED
#define	WIFSIGNALED(x)	(  !WIFEXITED(x) && !WIFSTOPPED(x) )
/* evaluates to the number of the signal that caused the child to terminate */
#undef WTERMSIG
#define	WTERMSIG(x)	(int)(WIFSIGNALED(x) ? ((x) & 0x7f) : -1)

