chiark / gitweb /
[PATCH] oops forgot to add the new klibc/include directory
[elogind.git] / klibc / include / sys / wait.h
1 /*
2  * sys/wait.h
3  */
4
5 #ifndef _SYS_WAIT_H
6 #define _SYS_WAIT_H
7
8 #include <klibc/extern.h>
9 #include <sys/types.h>
10 #include <sys/resource.h>
11
12 #include <linux/wait.h>
13
14 #define WEXITSTATUS(s)  (((s) & 0xff00) >> 8)
15 #define WTERMSIG(s)     ((s) & 0x7f)
16 #define WIFEXITED(s)    (WTERMSIG(s) == 0)
17 #define WIFSTOPPED(s)   (WTERMSIG(s) == 0x7f)
18 /* Ugly hack to avoid multiple evaluation of "s" */
19 #define WIFSIGNALED(s)  (WTERMSIG((s)+1) >= 2)
20 #define WCOREDUMP(s)    ((s) & 0x80)
21 #define WSTOPSIG(s)     WEXITSTATUS(s)
22
23 __extern pid_t wait(int *);
24 __extern pid_t waitpid(pid_t, int *, int);
25 __extern pid_t wait3(int *, int, struct rusage *);
26 __extern pid_t wait4(pid_t, int *, int, struct rusage *);
27
28 #endif /* _SYS_WAIT_H */