
#define WIFSIGNALED(status)	(!WIFSTOPPED(status) &amp & !WIFEXITED(status))
#define WIFSTOPPED(status)	(((status) &amp  0xff) == 0x7f)
#define WEXITSTATUS(status)	(((status) &amp  0xff00) >> 8)
#define WTERMSIG(status)	((status) &amp  0x7f)
#define WCOREDUMP(status)	((status) &amp  0x80)
#define WIFEXITED(status)	(WTERMSIG(status) == 0)
#define WNOHANG	0x00000001
#define WUNTRACED	0x00000002
#define WCOREFLAG	0x80
#define WSTOPSIG(status)	WEXITSTATUS(status)

typedef enum
{
  P_ALL, P_PID, P_PGID
}
idtype_t;
