Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: fusl/include/sys/wait.h

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/include/sys/vt.h ('k') | fusl/include/sys/xattr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef _SYS_WAIT_H
2 #define _SYS_WAIT_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 #include <features.h>
8
9 #define __NEED_pid_t
10 #define __NEED_id_t
11 #include <bits/alltypes.h>
12
13 typedef enum {
14 P_ALL = 0,
15 P_PID = 1,
16 P_PGID = 2
17 } idtype_t;
18
19 pid_t wait (int *);
20 pid_t waitpid (pid_t, int *, int );
21
22 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
23 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
24 || defined(_BSD_SOURCE)
25 #include <signal.h>
26 int waitid (idtype_t, id_t, siginfo_t *, int);
27 #endif
28
29 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
30 #include <sys/resource.h>
31 pid_t wait3 (int *, int, struct rusage *);
32 pid_t wait4 (pid_t, int *, int, struct rusage *);
33 #endif
34
35 #define WNOHANG 1
36 #define WUNTRACED 2
37
38 #define WSTOPPED 2
39 #define WEXITED 4
40 #define WCONTINUED 8
41 #define WNOWAIT 0x1000000
42
43 #define __WNOTHREAD 0x20000000
44 #define __WALL 0x40000000
45 #define __WCLONE 0x80000000
46
47 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
48 #define WTERMSIG(s) ((s) & 0x7f)
49 #define WSTOPSIG(s) WEXITSTATUS(s)
50 #define WCOREDUMP(s) ((s) & 0x80)
51 #define WIFEXITED(s) (!WTERMSIG(s))
52 #define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00)
53 #define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
54 #define WIFCONTINUED(s) ((s) == 0xffff)
55
56 #ifdef __cplusplus
57 }
58 #endif
59 #endif
OLDNEW
« no previous file with comments | « fusl/include/sys/vt.h ('k') | fusl/include/sys/xattr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698