2
0

wait.h 459 B

12345678910111213
  1. #ifndef _BITS_SYS_WAIT_H
  2. #define _BITS_SYS_WAIT_H
  3. #define WEXITSTATUS(s) (((s) >> 8) & 0xff)
  4. #define WTERMSIG(s) (((s) & 0x7f) != 0)
  5. #define WSTOPSIG(s) WEXITSTATUS(s)
  6. #define WCOREDUMP(s) (((s) & 0x80) != 0)
  7. #define WIFEXITED(s) (((s) & 0x7f) == 0)
  8. #define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
  9. #define WIFSIGNALED(s) (((((s) & 0x7f) + 1U) & 0x7f) >= 2) // Ends with 1111111 or 10000000
  10. #define WIFCONTINUED(s) ((s) == 0xffff)
  11. #endif /* _BITS_SYS_WAIT_H */