|
25 | 25 | */ |
26 | 26 | const WCONTINUED = UNKNOWN; |
27 | 27 | #endif |
| 28 | +#if defined (HAVE_DECL_WEXITED) && HAVE_DECL_WEXITED == 1 |
| 29 | +/** |
| 30 | + * @var int |
| 31 | + * @cvalue LONG_CONST(WEXITED) |
| 32 | + */ |
| 33 | +const WEXITED = UNKNOWN; |
| 34 | +#endif |
| 35 | +#if defined (HAVE_DECL_WSTOPPED) && HAVE_DECL_WSTOPPED == 1 |
| 36 | +/** |
| 37 | + * @var int |
| 38 | + * @cvalue LONG_CONST(WSTOPPED) |
| 39 | + */ |
| 40 | +const WSTOPPED = UNKNOWN; |
| 41 | +#endif |
| 42 | +#if defined (HAVE_DECL_WNOWAIT) && HAVE_DECL_WNOWAIT== 1 |
| 43 | +/** |
| 44 | + * @var int |
| 45 | + * @cvalue LONG_CONST(WNOWAIT) |
| 46 | + */ |
| 47 | +const WNOWAIT = UNKNOWN; |
| 48 | +#endif |
| 49 | + |
| 50 | +#ifdef HAVE_WAITID |
| 51 | +/* First argument to waitid */ |
| 52 | +#ifdef HAVE_POSIX_IDTYPES |
| 53 | +/** |
| 54 | + * @var int |
| 55 | + * @cvalue LONG_CONST(P_ALL) |
| 56 | + */ |
| 57 | +const P_ALL = UNKNOWN; |
| 58 | +/** |
| 59 | + * @var int |
| 60 | + * @cvalue LONG_CONST(P_PID) |
| 61 | + */ |
| 62 | +const P_PID = UNKNOWN; |
| 63 | +/** |
| 64 | + * @var int |
| 65 | + * @cvalue LONG_CONST(P_PGID) |
| 66 | + */ |
| 67 | +const P_PGID = UNKNOWN; |
| 68 | +#endif |
| 69 | +/* Linux specific idtype */ |
| 70 | +#ifdef HAVE_LINUX_IDTYPES |
| 71 | +/** |
| 72 | + * @var int |
| 73 | + * @cvalue LONG_CONST(P_PIDFD) |
| 74 | + */ |
| 75 | +const P_PIDFD = UNKNOWN; |
| 76 | +#endif |
| 77 | +/* NetBSD specific idtypes */ |
| 78 | +#ifdef HAVE_NETBSD_IDTYPES |
| 79 | +/** |
| 80 | + * @var int |
| 81 | + * @cvalue LONG_CONST(P_UID) |
| 82 | + */ |
| 83 | +const P_UID = UNKNOWN; |
| 84 | +/** |
| 85 | + * @var int |
| 86 | + * @cvalue LONG_CONST(P_GID) |
| 87 | + */ |
| 88 | +const P_GID = UNKNOWN; |
| 89 | +/** |
| 90 | + * @var int |
| 91 | + * @cvalue LONG_CONST(P_SID) |
| 92 | + */ |
| 93 | +const P_SID = UNKNOWN; |
| 94 | +#endif |
| 95 | +/* FreeBSD specific idtype */ |
| 96 | +#ifdef HAVE_FREEBSD_IDTYPES |
| 97 | +/** |
| 98 | + * @var int |
| 99 | + * @cvalue LONG_CONST(P_JAILID) |
| 100 | + */ |
| 101 | +const P_JAILID = UNKNOWN; |
| 102 | +#endif |
| 103 | +#endif |
28 | 104 |
|
29 | 105 | /* Signal Constants */ |
30 | 106 |
|
@@ -927,6 +1003,11 @@ function pcntl_fork(): int {} |
927 | 1003 | */ |
928 | 1004 | function pcntl_waitpid(int $process_id, &$status, int $flags = 0, &$resource_usage = []): int {} |
929 | 1005 |
|
| 1006 | +#if defined (HAVE_WAITID) && defined (HAVE_POSIX_IDTYPES) && defined (HAVE_DECL_WEXITED) && HAVE_DECL_WEXITED == 1 |
| 1007 | +/** @param array $info */ |
| 1008 | +function pcntl_waitid(int $idtype = P_ALL, ?int $id = null, &$info = [], int $flags = WEXITED): bool {} |
| 1009 | +#endif |
| 1010 | + |
930 | 1011 | /** |
931 | 1012 | * @param int $status |
932 | 1013 | * @param array $resource_usage |
|
0 commit comments