1 /* libc/sys/linux/sys/wait.h - Wait for children */ 2 3 /* Written 2000 by Werner Almesberger */ 4 5 6 #ifndef _SYS_WAIT_H 7 #define _SYS_WAIT_H 8 9 #include <linux/wait.h> 10 11 #define WIFEXITED(status) (!WTERMSIG(status)) 12 #define WEXITSTATUS(status) (((status) >> 8) & 0xff) 13 #define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status)) 14 #define WTERMSIG(status) ((status ) & 0x7f) 15 #define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) 16 #define WSTOPSIG(status) WEXITSTATUS(status) 17 18 #ifndef _POSIX_SOURCE 19 #define WCOREDUMP(status) ((status) & 0x80) 20 #endif 21 22 /* --- redundant stuff below --- */ 23 24 #include <_ansi.h> 25 #include <sys/types.h> 26 27 pid_t wait (int *); 28 pid_t waitpid (pid_t, int *, int); 29 30 pid_t _wait (int *); 31 32 33 #ifndef _POSIX_SOURCE 34 #include <sys/resource.h> 35 36 pid_t wait3(int *status,int options,struct rusage *rusage); 37 pid_t wait4(pid_t pid,int *status,int options,struct rusage *rusage); 38 #endif 39 40 #endif 41