[php-src] master: ext/pcntl: pcnt_setns few nitpicks changes. (#13885)

From: Date: Thu, 04 Apr 2024 20:05:40 +0000
Subject: [php-src] master: ext/pcntl: pcnt_setns few nitpicks changes. (#13885)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127945@lists.php.net to get a copy of this message
Author: David CARLIER (devnexen) Committer: GitHub (web-flow) Pusher: devnexen Date: 2024-04-04T21:05:35+01:00 Commit: https://github.com/php/php-src/commit/25081385321fe69b1a7cfc4640e15011cd201621 Raw diff: https://github.com/php/php-src/commit/25081385321fe69b1a7cfc4640e15011cd201621.diff ext/pcntl: pcnt_setns few nitpicks changes. (#13885) Changed paths: M ext/pcntl/pcntl.c M ext/pcntl/pcntl.stub.php M ext/pcntl/pcntl_arginfo.h Diff: diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index b19edb0ddb928..4c4d01c27ce53 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1428,7 +1428,7 @@ PHP_FUNCTION(pcntl_setns) switch (errno) { case EINVAL: case ESRCH: - zend_argument_value_error(1, "is not a valid process (%d)", pid); + zend_argument_value_error(1, "is not a valid process (" ZEND_LONG_FMT ")", pid); RETURN_THROWS(); case ENFILE: @@ -1455,7 +1455,7 @@ PHP_FUNCTION(pcntl_setns) PCNTL_G(last_error) = errno; switch (errno) { case ESRCH: - zend_argument_value_error(1, "process no longer available (%d)", pid); + zend_argument_value_error(1, "process no longer available (" ZEND_LONG_FMT ")", pid); RETURN_THROWS(); case EINVAL: diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php index 09e318307d054..a2420f335236d 100644 --- a/ext/pcntl/pcntl.stub.php +++ b/ext/pcntl/pcntl.stub.php @@ -992,5 +992,5 @@ function pcntl_forkx(int $flags): int{} #endif #ifdef HAVE_PIDFD_OPEN -function pcntl_setns(int $process_id = null, int $nstype = CLONE_NEWNET): bool {} +function pcntl_setns(?int $process_id = null, int $nstype = CLONE_NEWNET): bool {} #endif diff --git a/ext/pcntl/pcntl_arginfo.h b/ext/pcntl/pcntl_arginfo.h index c86c1d815b5e7..cd16e4f19cd62 100644 --- a/ext/pcntl/pcntl_arginfo.h +++ b/ext/pcntl/pcntl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 614bd67bb4cfcdc68d37141ff9dfad0a49c318b5 */ + * Stub hash: e5204cee68c41ff1201992f2572940c8f87980a3 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_fork, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -134,7 +134,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_PIDFD_OPEN) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_setns, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_id, IS_LONG, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, process_id, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nstype, IS_LONG, 0, "CLONE_NEWNET") ZEND_END_ARG_INFO() #endif

« previous php.cvs (#127945) next »