Skip to content

Commit 660585e

Browse files
committed
fix stub for pcntl_rfork
1 parent 95a9e55 commit 660585e

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ PHP_FUNCTION(pcntl_unshare)
14991499
#endif
15001500

15011501
#ifdef HAVE_RFORK
1502-
/* {{{ proto bool pcntl_rfork([int flags|custom signal)
1502+
/* {{{ proto bool pcntl_rfork(int flags [, int signal])
15031503
More control over the process creation is given over fork/vfork. */
15041504
PHP_FUNCTION(pcntl_rfork)
15051505
{

ext/pcntl/pcntl.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ function pcntl_unshare(int $flags): bool {}
8181
#endif
8282

8383
#ifdef HAVE_RFORK
84-
function pcntl_rfork(int $flags, int $signal): int{}
84+
function pcntl_rfork(int $flags, int $signal = 0): int{}
8585
#endif

ext/pcntl/pcntl_arginfo.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: dc44f2c96c13457cd6acae4897d6e416403e6756 */
2+
* Stub hash: fb7d243e0a1b5e85e0bfc0b2add5145cee134b25 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_fork, 0, 0, IS_LONG, 0)
55
ZEND_END_ARG_INFO()
@@ -122,7 +122,7 @@ ZEND_END_ARG_INFO()
122122
#if defined(HAVE_RFORK)
123123
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_rfork, 0, 1, IS_LONG, 0)
124124
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
125-
ZEND_ARG_TYPE_INFO(0, signal, IS_LONG, 0)
125+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, signal, IS_LONG, 0, "0")
126126
ZEND_END_ARG_INFO()
127127
#endif
128128

@@ -209,6 +209,9 @@ static const zend_function_entry ext_functions[] = {
209209
ZEND_FE(pcntl_async_signals, arginfo_pcntl_async_signals)
210210
#if defined(HAVE_UNSHARE)
211211
ZEND_FE(pcntl_unshare, arginfo_pcntl_unshare)
212+
#endif
213+
#if defined(HAVE_RFORK)
214+
ZEND_FE(pcntl_rfork, arginfo_pcntl_rfork)
212215
#endif
213216
ZEND_FE_END
214217
};

0 commit comments

Comments
 (0)