wait.h 697 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __WAIT_H
  2. #define __WAIT_H
  3. #pragma lib "/$M/lib/ape/libap.a"
  4. /* flag bits for third argument of waitpid */
  5. #define WNOHANG 0x1
  6. #define WUNTRACED 0x2
  7. /* macros for examining status returned */
  8. #ifndef WIFEXITED
  9. #define WIFEXITED(s) (((s) & 0xFF) == 0)
  10. #define WEXITSTATUS(s) ((s>>8)&0xFF)
  11. #define WIFSIGNALED(s) (((s) & 0xFF) != 0)
  12. #define WTERMSIG(s) ((s) & 0xFF)
  13. #define WIFSTOPPED(s) (0)
  14. #define WSTOPSIG(s) (0)
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. pid_t wait(int *);
  20. pid_t waitpid(pid_t, int *, int);
  21. #ifdef _BSD_EXTENSION
  22. struct rusage;
  23. pid_t wait3(int *, int, struct rusage *);
  24. pid_t wait4(pid_t, int *, int, struct rusage *);
  25. #endif
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif