summaryrefslogtreecommitdiffstats
path: root/src/include/sys/wait.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/sys/wait.h')
-rw-r--r--src/include/sys/wait.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/sys/wait.h b/src/include/sys/wait.h
new file mode 100644
index 0000000..53190c2
--- /dev/null
+++ b/src/include/sys/wait.h
@@ -0,0 +1,23 @@
1#ifndef _SYS_WAIT_H
2#define _SYS_WAIT_H
3
4#include <sys/types.h>
5
6#define _LOW(v) ( (v) & 0377)
7#define _HIGH(v) ( ((v) >> 8) & 0377)
8
9/* options for waitpid, WUNTRACED not supported */
10#define WNOHANG 1
11#define WUNTRACED 2
12
13#define WIFEXITED(s) (!((s)&0xFF)
14#define WIFSTOPPED(s) (((s)&0xFF)==0x7F)
15#define WEXITSTATUS(s) (((s)>>8)&0xFF)
16#define WTERMSIG(s) ((s)&0x7F)
17#define WSTOPSIG(s) (((s)>>8)&0xFF)
18#define WIFSIGNALED(s) (((unsigned int)(s)-1 & 0xFFFF) < 0xFF)
19
20pid_t wait(int *stat_loc);
21pid_t waitpid(pid_t pid, int *stat_loc, int options);
22
23#endif