projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix misleading comment in strstr
[musl]
/
include
/
sys
/
wait.h
diff --git
a/include/sys/wait.h
b/include/sys/wait.h
index
8bcac8a
..
d4b1f2e
100644
(file)
--- a/
include/sys/wait.h
+++ b/
include/sys/wait.h
@@
-6,19
+6,27
@@
extern "C" {
#include <features.h>
#include <features.h>
-#include <signal.h>
-
#define __NEED_pid_t
#define __NEED_id_t
#define __NEED_pid_t
#define __NEED_id_t
-#define __NEED_siginfo_t
#include <bits/alltypes.h>
#include <bits/alltypes.h>
-typedef int idtype_t;
+typedef enum {
+ P_ALL = 0,
+ P_PID = 1,
+ P_PGID = 2,
+ P_PIDFD = 3
+} idtype_t;
pid_t wait (int *);
pid_t wait (int *);
-int waitid (idtype_t, id_t, siginfo_t *, int);
pid_t waitpid (pid_t, int *, int );
pid_t waitpid (pid_t, int *, int );
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
+#include <signal.h>
+int waitid (idtype_t, id_t, siginfo_t *, int);
+#endif
+
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#include <sys/resource.h>
pid_t wait3 (int *, int, struct rusage *);
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#include <sys/resource.h>
pid_t wait3 (int *, int, struct rusage *);
@@
-33,19
+41,24
@@
pid_t wait4 (pid_t, int *, int, struct rusage *);
#define WCONTINUED 8
#define WNOWAIT 0x1000000
#define WCONTINUED 8
#define WNOWAIT 0x1000000
-#define
P_ALL
0
-#define
P_PID 1
-#define
P_PGID 2
+#define
__WNOTHREAD 0x2000000
0
+#define
__WALL 0x40000000
+#define
__WCLONE 0x80000000
-#ifndef WEXITSTATUS
#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
#define WTERMSIG(s) ((s) & 0x7f)
#define WSTOPSIG(s) WEXITSTATUS(s)
#define WCOREDUMP(s) ((s) & 0x80)
#define WIFEXITED(s) (!WTERMSIG(s))
#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
#define WTERMSIG(s) ((s) & 0x7f)
#define WSTOPSIG(s) WEXITSTATUS(s)
#define WCOREDUMP(s) ((s) & 0x80)
#define WIFEXITED(s) (!WTERMSIG(s))
-#define WIFSTOPPED(s) ((
(s) & 0xff) == 0x7f
)
-#define WIFSIGNALED(s) (((s
igned char) (((s) & 0x7f) + 1) >> 1) > 0
)
+#define WIFSTOPPED(s) ((
short)((((s)&0xffff)*0x10001)>>8) > 0x7f00
)
+#define WIFSIGNALED(s) (((s
)&0xffff)-1U < 0xffu
)
#define WIFCONTINUED(s) ((s) == 0xffff)
#define WIFCONTINUED(s) ((s) == 0xffff)
+
+#if _REDIR_TIME64
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+__REDIR(wait3, __wait3_time64);
+__REDIR(wait4, __wait4_time64);
+#endif
#endif
#ifdef __cplusplus
#endif
#ifdef __cplusplus