pcntl.stub.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /** @generate-class-entries */
  3. function pcntl_fork(): int {}
  4. /**
  5. * @param int $status
  6. * @param array $resource_usage
  7. */
  8. function pcntl_waitpid(int $process_id, &$status, int $flags = 0, &$resource_usage = []): int {}
  9. /**
  10. * @param int $status
  11. * @param array $resource_usage
  12. */
  13. function pcntl_wait(&$status, int $flags = 0, &$resource_usage = []): int {}
  14. /** @param callable|int $handler */
  15. function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): bool {}
  16. /** @return callable|int */
  17. function pcntl_signal_get_handler(int $signal) {}
  18. function pcntl_signal_dispatch(): bool {}
  19. #ifdef HAVE_SIGPROCMASK
  20. /** @param array $old_signals */
  21. function pcntl_sigprocmask(int $mode, array $signals, &$old_signals = null): bool {}
  22. #endif
  23. #ifdef HAVE_STRUCT_SIGINFO_T
  24. #if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
  25. /** @param array $info */
  26. function pcntl_sigwaitinfo(array $signals, &$info = []): int|false {}
  27. /** @param array $info */
  28. function pcntl_sigtimedwait(array $signals, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {}
  29. #endif
  30. #endif
  31. function pcntl_wifexited(int $status): bool {}
  32. function pcntl_wifstopped(int $status): bool {}
  33. #ifdef HAVE_WCONTINUED
  34. function pcntl_wifcontinued(int $status): bool {}
  35. #endif
  36. function pcntl_wifsignaled(int $status): bool {}
  37. function pcntl_wexitstatus(int $status): int|false {}
  38. function pcntl_wtermsig(int $status): int|false {}
  39. function pcntl_wstopsig(int $status): int|false {}
  40. function pcntl_exec(string $path, array $args = [], array $env_vars = []): bool {}
  41. function pcntl_alarm(int $seconds): int {}
  42. function pcntl_get_last_error(): int {}
  43. /** @alias pcntl_get_last_error */
  44. function pcntl_errno(): int {}
  45. #ifdef HAVE_GETPRIORITY
  46. function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): int|false {}
  47. #endif
  48. #ifdef HAVE_SETPRIORITY
  49. function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = PRIO_PROCESS): bool{}
  50. #endif
  51. function pcntl_strerror(int $error_code): string {}
  52. function pcntl_async_signals(?bool $enable = null): bool {}
  53. #ifdef HAVE_UNSHARE
  54. function pcntl_unshare(int $flags): bool {}
  55. #endif
  56. #ifdef HAVE_RFORK
  57. function pcntl_rfork(int $flags, int $signal = 0): int{}
  58. #endif