wait.h 469 B

123456789101112131415161718
  1. #pragma once
  2. #include <sys/types.h>
  3. #define WNOHANG 1
  4. #define WUNTRACED 2
  5. /* This were taken from newlib, but they remain true */
  6. #define WIFEXITED(w) (((w) & 0xff) == 0)
  7. #define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
  8. #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
  9. #define WEXITSTATUS(w) (((w) >> 8) & 0xff)
  10. #define WTERMSIG(w) ((w) & 0x7f)
  11. #define WSTOPSIG WEXITSTATUS
  12. extern pid_t wait(int*);
  13. extern pid_t waitpid(pid_t, int *, int);