summaryrefslogtreecommitdiff
path: root/ext/pcntl/pcntl.stub.php
diff options
context:
space:
mode:
authorCraig Duncan <git@duncanc.co.uk>2019-08-26 18:06:18 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2019-09-20 11:15:22 +0200
commit48e696319c970485a9ebd6b6b8483731603b3473 (patch)
tree3d007d8f994da238fa39c385f6ecf092d0434410 /ext/pcntl/pcntl.stub.php
parent3d59cec506f8f69d5bd96af733321269cfc11b1d (diff)
downloadphp-git-48e696319c970485a9ebd6b6b8483731603b3473.tar.gz
Convert pcntl functions arginfo to php stubs
Diffstat (limited to 'ext/pcntl/pcntl.stub.php')
-rw-r--r--ext/pcntl/pcntl.stub.php74
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