diff options
Diffstat (limited to 'ext/pcntl/pcntl.stub.php')
| -rw-r--r-- | ext/pcntl/pcntl.stub.php | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php new file mode 100644 index 0000000000..1bb1f69709 --- /dev/null +++ b/ext/pcntl/pcntl.stub.php @@ -0,0 +1,74 @@ +<?php + +function pcntl_fork(): int {} + +function pcntl_waitpid(int $pid, &$status, int $options = 0, &$rusage = []): int {} + +function pcntl_wait(&$status, int $options = 0, &$rusage = []): int {} + +/** + * @param callable|int $handler + */ +function pcntl_signal(int $signo, $handler, bool $restart_syscalls = true): bool {} + +/** @return mixed */ +function pcntl_signal_get_handler(int $signo) {} + +function pcntl_signal_dispatch(): bool {} + +#ifdef HAVE_SIGPROCMASK +function pcntl_sigprocmask(int $how, array $set, &$oldset = null): bool {} +#endif + +#ifdef HAVE_STRUCT_SIGINFO_T +#if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT +/** @return int|false */ +function pcntl_sigwaitinfo(array $set, &$info = []) {} + +/** @return int|false */ +function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0) {} +#endif +#endif + +function pcntl_wifexited(int $status): bool {} + +function pcntl_wifstopped(int $status): bool {} + +#ifdef HAVE_WCONTINUED +function pcntl_wifcontinued(int $status): bool {} +#endif + +function pcntl_wifsignaled(int $status): bool {} + +/** @return int|false */ +function pcntl_wifexitstatus(int $status) {} + +/** @return int|false */ +function pcntl_wtermsig(int $status) {} + +/** @return int|false */ +function pcntl_wstopsig(int $status) {} + +/** @return false */ +function pcntl_exec(string $path, array $args = [], array $envs = []): bool {} + +function pcntl_alarm(int $seconds): int {} + +function pcntl_get_last_error(): int {} + +#ifdef HAVE_GETPRIORITY +/** @return int|false */ +function pcntl_getpriority(int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS) {} +#endif + +#ifdef HAVE_SETPRIORITY +function pcntl_setpriority(int $priority, int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS): bool{} +#endif + +function pcntl_strerror(int $errno): string {} + +function pcntl_async_signals(bool $on = UNKNOWN): bool {} + +#ifdef HAVE_UNSHARE +function pcntl_unshare(int $flags): bool {} +#endif |
