summaryrefslogtreecommitdiff
path: root/ext/pcntl
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-02-18 19:59:15 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-02-18 21:10:36 +0100
commit736b22dc0b2fc36e9bd87f2ee5af8c4b2be9fd3d (patch)
treed64c1ceccf5eb553e6a210105238c32da693c22a /ext/pcntl
parent172010a08d0916ab1678f7f0768472c120330307 (diff)
downloadphp-git-736b22dc0b2fc36e9bd87f2ee5af8c4b2be9fd3d.tar.gz
Add stubs for aliases
Closes GH-5187
Diffstat (limited to 'ext/pcntl')
-rw-r--r--ext/pcntl/pcntl.c2
-rw-r--r--ext/pcntl/pcntl.stub.php2
-rw-r--r--ext/pcntl/pcntl_arginfo.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 0cf698c9a8..c7aa6bcbc3 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -73,7 +73,7 @@ static const zend_function_entry pcntl_functions[] = {
PHP_FE(pcntl_exec, arginfo_pcntl_exec)
PHP_FE(pcntl_alarm, arginfo_pcntl_alarm)
PHP_FE(pcntl_get_last_error, arginfo_pcntl_get_last_error)
- PHP_FALIAS(pcntl_errno, pcntl_get_last_error, arginfo_pcntl_get_last_error)
+ PHP_FALIAS(pcntl_errno, pcntl_get_last_error, arginfo_pcntl_errno)
PHP_FE(pcntl_strerror, arginfo_pcntl_strerror)
#ifdef HAVE_GETPRIORITY
PHP_FE(pcntl_getpriority, arginfo_pcntl_getpriority)
diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php
index 7ca872663a..c8da88c481 100644
--- a/ext/pcntl/pcntl.stub.php
+++ b/ext/pcntl/pcntl.stub.php
@@ -50,6 +50,8 @@ function pcntl_alarm(int $seconds): int {}
function pcntl_get_last_error(): int {}
+function pcntl_errno(): int {}
+
#ifdef HAVE_GETPRIORITY
function pcntl_getpriority(int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS): int|false {}
#endif
diff --git a/ext/pcntl/pcntl_arginfo.h b/ext/pcntl/pcntl_arginfo.h
index 7fc37ab4ec..2b73bac3eb 100644
--- a/ext/pcntl/pcntl_arginfo.h
+++ b/ext/pcntl/pcntl_arginfo.h
@@ -87,6 +87,8 @@ ZEND_END_ARG_INFO()
#define arginfo_pcntl_get_last_error arginfo_pcntl_fork
+#define arginfo_pcntl_errno arginfo_pcntl_fork
+
#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(0, pid, IS_LONG, 0)