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