wait.h 593 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __GBLIBC_SYS_WAIT_H
  2. #define __GBLIBC_SYS_WAIT_H
  3. #include <sys/types.h>
  4. #define WNOHANG 1
  5. #define WUNTRACED 2
  6. #define WEXISTATUS(s) (((s) & 0xff00) >> 8)
  7. #define WTERMSIG(s) ((s) & 0x7f)
  8. #define WSTOPSIG(s) WEXITSTATUS(s)
  9. #define WCOREDUMP(s) ((s) & 0x80)
  10. #define WIFEXITED(s) (!WTERMSIG(s))
  11. #define WIFSTOPPED(s) (((s) & 0x7f) == 0x7f)
  12. #define WIFSIGNALED(s) (WTERMSIG(s) && !WIFSTOPPED(s))
  13. #define WIFCONTINUED(s) ((s) == 0xffff)
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. pid_t wait(int* code);
  18. pid_t waitpid(pid_t pid, int* code, int options);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif