Skip to content

Commit 7a1dc18

Browse files
committed
Update ext/pcntl parameter names
Closes GH-6278.
1 parent 84e0ea6 commit 7a1dc18

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

ext/pcntl/pcntl.stub.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,36 @@ function pcntl_fork(): int {}
66

77
/**
88
* @param int $status
9-
* @param array $rusage
9+
* @param array $resource_usage
1010
*/
11-
function pcntl_waitpid(int $pid, &$status, int $options = 0, &$rusage = []): int {}
11+
function pcntl_waitpid(int $process_id, &$status, int $flags = 0, &$resource_usage = []): int {}
1212

1313
/**
1414
* @param int $status
15-
* @param array $rusage
15+
* @param array $resource_usage
1616
*/
17-
function pcntl_wait(&$status, int $options = 0, &$rusage = []): int {}
17+
function pcntl_wait(&$status, int $flags = 0, &$resource_usage = []): int {}
1818

1919
/** @param callable|int $handler */
20-
function pcntl_signal(int $signo, $handler, bool $restart_syscalls = true): bool {}
20+
function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): bool {}
2121

2222
/** @return callable|int */
23-
function pcntl_signal_get_handler(int $signo) {}
23+
function pcntl_signal_get_handler(int $signal) {}
2424

2525
function pcntl_signal_dispatch(): bool {}
2626

2727
#ifdef HAVE_SIGPROCMASK
28-
/** @param array $oldset */
29-
function pcntl_sigprocmask(int $how, array $set, &$oldset = null): bool {}
28+
/** @param array $old_signals */
29+
function pcntl_sigprocmask(int $mode, array $signals, &$old_signals = null): bool {}
3030
#endif
3131

3232
#ifdef HAVE_STRUCT_SIGINFO_T
3333
#if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
3434
/** @param array $info */
35-
function pcntl_sigwaitinfo(array $set, &$info = []): int|false {}
35+
function pcntl_sigwaitinfo(array $signals, &$info = []): int|false {}
3636

3737
/** @param array $info */
38-
function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {}
38+
function pcntl_sigtimedwait(array $signals, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {}
3939
#endif
4040
#endif
4141

@@ -55,7 +55,7 @@ function pcntl_wtermsig(int $status): int|false {}
5555

5656
function pcntl_wstopsig(int $status): int|false {}
5757

58-
function pcntl_exec(string $path, array $args = [], array $envs = []): bool {}
58+
function pcntl_exec(string $path, array $args = [], array $env_vars = []): bool {}
5959

6060
function pcntl_alarm(int $seconds): int {}
6161

@@ -65,16 +65,16 @@ function pcntl_get_last_error(): int {}
6565
function pcntl_errno(): int {}
6666

6767
#ifdef HAVE_GETPRIORITY
68-
function pcntl_getpriority(?int $pid = null, int $process_identifier = PRIO_PROCESS): int|false {}
68+
function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): int|false {}
6969
#endif
7070

7171
#ifdef HAVE_SETPRIORITY
72-
function pcntl_setpriority(int $priority, ?int $pid = null, int $process_identifier = PRIO_PROCESS): bool{}
72+
function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = PRIO_PROCESS): bool{}
7373
#endif
7474

75-
function pcntl_strerror(int $errno): string {}
75+
function pcntl_strerror(int $error_code): string {}
7676

77-
function pcntl_async_signals(?bool $on = null): bool {}
77+
function pcntl_async_signals(?bool $enable = null): bool {}
7878

7979
#ifdef HAVE_UNSHARE
8080
function pcntl_unshare(int $flags): bool {}

ext/pcntl/pcntl_arginfo.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 306208d94ba3bf6f8112f868a332e99717bc07fa */
2+
* Stub hash: 8742901e9b4fe5ee595a1e7c492474723f95d253 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_fork, 0, 0, IS_LONG, 0)
55
ZEND_END_ARG_INFO()
66

77
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_waitpid, 0, 2, IS_LONG, 0)
8-
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
8+
ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0)
99
ZEND_ARG_INFO(1, status)
10-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
11-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, rusage, "[]")
10+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
11+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, resource_usage, "[]")
1212
ZEND_END_ARG_INFO()
1313

1414
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_wait, 0, 1, IS_LONG, 0)
1515
ZEND_ARG_INFO(1, status)
16-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
17-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, rusage, "[]")
16+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
17+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, resource_usage, "[]")
1818
ZEND_END_ARG_INFO()
1919

2020
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_signal, 0, 2, _IS_BOOL, 0)
21-
ZEND_ARG_TYPE_INFO(0, signo, IS_LONG, 0)
21+
ZEND_ARG_TYPE_INFO(0, signal, IS_LONG, 0)
2222
ZEND_ARG_INFO(0, handler)
2323
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, restart_syscalls, _IS_BOOL, 0, "true")
2424
ZEND_END_ARG_INFO()
2525

2626
ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_signal_get_handler, 0, 0, 1)
27-
ZEND_ARG_TYPE_INFO(0, signo, IS_LONG, 0)
27+
ZEND_ARG_TYPE_INFO(0, signal, IS_LONG, 0)
2828
ZEND_END_ARG_INFO()
2929

3030
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_signal_dispatch, 0, 0, _IS_BOOL, 0)
3131
ZEND_END_ARG_INFO()
3232

3333
#if defined(HAVE_SIGPROCMASK)
3434
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_sigprocmask, 0, 2, _IS_BOOL, 0)
35-
ZEND_ARG_TYPE_INFO(0, how, IS_LONG, 0)
36-
ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0)
37-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, oldset, "null")
35+
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
36+
ZEND_ARG_TYPE_INFO(0, signals, IS_ARRAY, 0)
37+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, old_signals, "null")
3838
ZEND_END_ARG_INFO()
3939
#endif
4040

4141
#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
4242
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigwaitinfo, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
43-
ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0)
43+
ZEND_ARG_TYPE_INFO(0, signals, IS_ARRAY, 0)
4444
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]")
4545
ZEND_END_ARG_INFO()
4646
#endif
4747

4848
#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
4949
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigtimedwait, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
50-
ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0)
50+
ZEND_ARG_TYPE_INFO(0, signals, IS_ARRAY, 0)
5151
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]")
5252
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seconds, IS_LONG, 0, "0")
5353
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nanoseconds, IS_LONG, 0, "0")
@@ -79,7 +79,7 @@ ZEND_END_ARG_INFO()
7979
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_exec, 0, 1, _IS_BOOL, 0)
8080
ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
8181
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 0, "[]")
82-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, envs, IS_ARRAY, 0, "[]")
82+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, env_vars, IS_ARRAY, 0, "[]")
8383
ZEND_END_ARG_INFO()
8484

8585
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_alarm, 0, 1, IS_LONG, 0)
@@ -92,25 +92,25 @@ ZEND_END_ARG_INFO()
9292

9393
#if defined(HAVE_GETPRIORITY)
9494
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_getpriority, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
95-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pid, IS_LONG, 1, "null")
96-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_identifier, IS_LONG, 0, "PRIO_PROCESS")
95+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_id, IS_LONG, 1, "null")
96+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PRIO_PROCESS")
9797
ZEND_END_ARG_INFO()
9898
#endif
9999

100100
#if defined(HAVE_SETPRIORITY)
101101
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_setpriority, 0, 1, _IS_BOOL, 0)
102102
ZEND_ARG_TYPE_INFO(0, priority, IS_LONG, 0)
103-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pid, IS_LONG, 1, "null")
104-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_identifier, IS_LONG, 0, "PRIO_PROCESS")
103+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_id, IS_LONG, 1, "null")
104+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PRIO_PROCESS")
105105
ZEND_END_ARG_INFO()
106106
#endif
107107

108108
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_strerror, 0, 1, IS_STRING, 0)
109-
ZEND_ARG_TYPE_INFO(0, errno, IS_LONG, 0)
109+
ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0)
110110
ZEND_END_ARG_INFO()
111111

112112
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_async_signals, 0, 0, _IS_BOOL, 0)
113-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, on, _IS_BOOL, 1, "null")
113+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 1, "null")
114114
ZEND_END_ARG_INFO()
115115

116116
#if defined(HAVE_UNSHARE)

ext/pcntl/tests/pcntl_getpriority_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ try {
2020

2121
?>
2222
--EXPECT--
23-
pcntl_getpriority(): Argument #2 ($process_identifier) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS
23+
pcntl_getpriority(): Argument #2 ($mode) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS

ext/pcntl/tests/pcntl_setpriority_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ try {
2020

2121
?>
2222
--EXPECT--
23-
pcntl_setpriority(): Argument #3 ($process_identifier) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS
23+
pcntl_setpriority(): Argument #3 ($mode) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS

ext/pcntl/tests/pcntl_signal.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ echo "ok\n";
4545
signal dispatched
4646
got signal from %r\d+|nobody%r
4747
bool(true)
48-
pcntl_signal(): Argument #1 ($signo) must be greater than or equal to 1
49-
pcntl_signal(): Argument #1 ($signo) must be greater than or equal to 1
48+
pcntl_signal(): Argument #1 ($signal) must be greater than or equal to 1
49+
pcntl_signal(): Argument #1 ($signal) must be greater than or equal to 1
5050
pcntl_signal(): Argument #2 ($handler) must be of type callable|int, string given
5151
ok

0 commit comments

Comments
 (0)