wexitstatus.h 364 B

12345678910
  1. #ifndef WEXITSTATUS
  2. #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
  3. #define WTERMSIG(s) ((s) & 0x7f)
  4. #define WSTOPSIG(s) WEXITSTATUS(s)
  5. #define WCOREDUMP(s) ((s) & 0x80)
  6. #define WIFEXITED(s) (!WTERMSIG(s))
  7. #define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
  8. #define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0)
  9. #define WIFCONTINUED(s) ((s) == 0xffff)
  10. #endif