Rev 4921 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4921 | Rev 6099 | ||
---|---|---|---|
1 | #ifndef _SYS_WAIT_H |
1 | #ifndef _SYS_WAIT_H |
2 | #define _SYS_WAIT_H |
2 | #define _SYS_WAIT_H |
3 | 3 | ||
4 | #ifdef __cplusplus |
4 | #ifdef __cplusplus |
5 | extern "C" { |
5 | extern "C" { |
6 | #endif |
6 | #endif |
7 | 7 | ||
8 | #include |
8 | #include |
9 | 9 | ||
10 | #define WNOHANG 1 |
10 | #define WNOHANG 1 |
11 | #define WUNTRACED 2 |
11 | #define WUNTRACED 2 |
12 | 12 | ||
13 | /* A status looks like: |
13 | /* A status looks like: |
14 | <2 bytes info> <2 bytes code> |
14 | <1 byte info> <1 byte code> |
15 | 15 | ||
16 | |
16 | |
17 | |
17 | |
18 | |
18 | |
19 | |
19 | |
20 | */ |
20 | */ |
21 | 21 | ||
22 | #define WIFEXITED(w) (((w) & 0xff) == 0) |
22 | #define WIFEXITED(w) (((w) & 0xff) == 0) |
23 | #define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f)) |
23 | #define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f)) |
24 | #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) |
24 | #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) |
25 | #define WEXITSTATUS(w) (((w) >> 8) & 0xff) |
25 | #define WEXITSTATUS(w) (((w) >> 8) & 0xff) |
26 | #define WTERMSIG(w) ((w) & 0x7f) |
26 | #define WTERMSIG(w) ((w) & 0x7f) |
27 | #define WSTOPSIG WEXITSTATUS |
27 | #define WSTOPSIG WEXITSTATUS |
28 | 28 | ||
29 | pid_t wait (int *); |
29 | pid_t wait (int *); |
30 | pid_t waitpid (pid_t, int *, int); |
30 | pid_t waitpid (pid_t, int *, int); |
31 | 31 | ||
32 | #ifdef _COMPILING_NEWLIB |
32 | #ifdef _COMPILING_NEWLIB |
33 | pid_t _wait (int *); |
33 | pid_t _wait (int *); |
34 | #endif |
34 | #endif |
35 | 35 | ||
36 | /* Provide prototypes for most of the _ |
36 | /* Provide prototypes for most of the _ |
37 | provided in newlib for some compilers. */ |
37 | provided in newlib for some compilers. */ |
38 | pid_t _wait (int *); |
38 | pid_t _wait (int *); |
39 | 39 | ||
40 | #ifdef __cplusplus |
40 | #ifdef __cplusplus |
41 | }; |
41 | }; |
42 | #endif |
42 | #endif |
43 | 43 | ||
44 | #endif>2>2> |
44 | #endif>1>1> |