diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php index 2c3cd64aad170..ea66c9f898369 100644 --- a/ext/pcntl/pcntl.stub.php +++ b/ext/pcntl/pcntl.stub.php @@ -6,36 +6,36 @@ function pcntl_fork(): int {} /** * @param int $status - * @param array $rusage + * @param array $resource_usage */ -function pcntl_waitpid(int $pid, &$status, int $options = 0, &$rusage = []): int {} +function pcntl_waitpid(int $process_id, &$status, int $flags = 0, &$resource_usage = []): int {} /** * @param int $status - * @param array $rusage + * @param array $resource_usage */ -function pcntl_wait(&$status, int $options = 0, &$rusage = []): int {} +function pcntl_wait(&$status, int $flags = 0, &$resource_usage = []): int {} /** @param callable|int $handler */ -function pcntl_signal(int $signo, $handler, bool $restart_syscalls = true): bool {} +function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): bool {} /** @return callable|int */ -function pcntl_signal_get_handler(int $signo) {} +function pcntl_signal_get_handler(int $signal) {} function pcntl_signal_dispatch(): bool {} #ifdef HAVE_SIGPROCMASK -/** @param array $oldset */ -function pcntl_sigprocmask(int $how, array $set, &$oldset = null): bool {} +/** @param array $old_signals */ +function pcntl_sigprocmask(int $mode, array $signals, &$old_signals = null): bool {} #endif #ifdef HAVE_STRUCT_SIGINFO_T #if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT) /** @param array $info */ -function pcntl_sigwaitinfo(array $set, &$info = []): int|false {} +function pcntl_sigwaitinfo(array $signals, &$info = []): int|false {} /** @param array $info */ -function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {} +function pcntl_sigtimedwait(array $signals, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {} #endif #endif @@ -55,7 +55,7 @@ function pcntl_wtermsig(int $status): int|false {} function pcntl_wstopsig(int $status): int|false {} -function pcntl_exec(string $path, array $args = [], array $envs = []): bool {} +function pcntl_exec(string $path, array $args = [], array $env_vars = []): bool {} function pcntl_alarm(int $seconds): int {} @@ -65,16 +65,16 @@ function pcntl_get_last_error(): int {} function pcntl_errno(): int {} #ifdef HAVE_GETPRIORITY -function pcntl_getpriority(?int $pid = null, int $process_identifier = PRIO_PROCESS): int|false {} +function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): int|false {} #endif #ifdef HAVE_SETPRIORITY -function pcntl_setpriority(int $priority, ?int $pid = null, int $process_identifier = PRIO_PROCESS): bool{} +function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = PRIO_PROCESS): bool{} #endif -function pcntl_strerror(int $errno): string {} +function pcntl_strerror(int $error_code): string {} -function pcntl_async_signals(?bool $on = null): bool {} +function pcntl_async_signals(?bool $enable = null): bool {} #ifdef HAVE_UNSHARE function pcntl_unshare(int $flags): bool {} diff --git a/ext/pcntl/pcntl_arginfo.h b/ext/pcntl/pcntl_arginfo.h index fb0fe5fa08049..87a2579c9bbad 100644 --- a/ext/pcntl/pcntl_arginfo.h +++ b/ext/pcntl/pcntl_arginfo.h @@ -1,30 +1,30 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 306208d94ba3bf6f8112f868a332e99717bc07fa */ + * Stub hash: 8742901e9b4fe5ee595a1e7c492474723f95d253 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_fork, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_waitpid, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) ZEND_ARG_INFO(1, status) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, rusage, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, resource_usage, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_wait, 0, 1, IS_LONG, 0) ZEND_ARG_INFO(1, status) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, rusage, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, resource_usage, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_signal, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, signo, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, signal, IS_LONG, 0) ZEND_ARG_INFO(0, handler) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, restart_syscalls, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_signal_get_handler, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, signo, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, signal, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_signal_dispatch, 0, 0, _IS_BOOL, 0) @@ -32,22 +32,22 @@ ZEND_END_ARG_INFO() #if defined(HAVE_SIGPROCMASK) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_sigprocmask, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, how, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, oldset, "null") + ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, signals, IS_ARRAY, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, old_signals, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigwaitinfo, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, signals, IS_ARRAY, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]") ZEND_END_ARG_INFO() #endif #if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigtimedwait, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, signals, IS_ARRAY, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seconds, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nanoseconds, IS_LONG, 0, "0") @@ -79,7 +79,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_exec, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 0, "[]") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, envs, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, env_vars, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_alarm, 0, 1, IS_LONG, 0) @@ -92,25 +92,25 @@ ZEND_END_ARG_INFO() #if defined(HAVE_GETPRIORITY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_getpriority, 0, 0, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pid, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_identifier, IS_LONG, 0, "PRIO_PROCESS") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_id, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PRIO_PROCESS") ZEND_END_ARG_INFO() #endif #if defined(HAVE_SETPRIORITY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_setpriority, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, priority, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pid, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_identifier, IS_LONG, 0, "PRIO_PROCESS") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_id, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PRIO_PROCESS") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_strerror, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, errno, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_async_signals, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, on, _IS_BOOL, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 1, "null") ZEND_END_ARG_INFO() #if defined(HAVE_UNSHARE) diff --git a/ext/pcntl/tests/pcntl_getpriority_error.phpt b/ext/pcntl/tests/pcntl_getpriority_error.phpt index 5276d4df77f6e..cf2a17a6f3f53 100644 --- a/ext/pcntl/tests/pcntl_getpriority_error.phpt +++ b/ext/pcntl/tests/pcntl_getpriority_error.phpt @@ -20,4 +20,4 @@ try { ?> --EXPECT-- -pcntl_getpriority(): Argument #2 ($process_identifier) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS +pcntl_getpriority(): Argument #2 ($mode) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS diff --git a/ext/pcntl/tests/pcntl_setpriority_error.phpt b/ext/pcntl/tests/pcntl_setpriority_error.phpt index d354ab2bc5c14..f4b578158795a 100644 --- a/ext/pcntl/tests/pcntl_setpriority_error.phpt +++ b/ext/pcntl/tests/pcntl_setpriority_error.phpt @@ -20,4 +20,4 @@ try { ?> --EXPECT-- -pcntl_setpriority(): Argument #3 ($process_identifier) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS +pcntl_setpriority(): Argument #3 ($mode) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS diff --git a/ext/pcntl/tests/pcntl_signal.phpt b/ext/pcntl/tests/pcntl_signal.phpt index 4b94064e2a973..f05bfc3c77e02 100644 --- a/ext/pcntl/tests/pcntl_signal.phpt +++ b/ext/pcntl/tests/pcntl_signal.phpt @@ -45,7 +45,7 @@ echo "ok\n"; signal dispatched got signal from %r\d+|nobody%r bool(true) -pcntl_signal(): Argument #1 ($signo) must be greater than or equal to 1 -pcntl_signal(): Argument #1 ($signo) must be greater than or equal to 1 +pcntl_signal(): Argument #1 ($signal) must be greater than or equal to 1 +pcntl_signal(): Argument #1 ($signal) must be greater than or equal to 1 pcntl_signal(): Argument #2 ($handler) must be of type callable|int, string given ok