From b890f28c0c6d2856eadcdc34b3faf83a846b3d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 16 May 2021 13:51:07 +0200 Subject: [PATCH] Update ext/pcntl methodsynopses based on stubs Co-authored-by: Christoph M. Becker Closes GH-600. --- .../pcntl/functions/pcntl-async-signals.xml | 38 +++++++++++++----- reference/pcntl/functions/pcntl-exec.xml | 15 ++++--- .../pcntl/functions/pcntl-getpriority.xml | 39 ++++++++++++++----- .../pcntl/functions/pcntl-setpriority.xml | 37 ++++++++++++++---- .../functions/pcntl-signal-get-handler.xml | 13 +++---- reference/pcntl/functions/pcntl-signal.xml | 9 ++--- .../pcntl/functions/pcntl-sigprocmask.xml | 17 ++++---- .../pcntl/functions/pcntl-sigtimedwait.xml | 15 ++++--- .../pcntl/functions/pcntl-sigwaitinfo.xml | 17 ++++---- reference/pcntl/functions/pcntl-strerror.xml | 10 ++--- reference/pcntl/functions/pcntl-wait.xml | 15 ++++--- reference/pcntl/functions/pcntl-waitpid.xml | 31 +++++++-------- .../pcntl/functions/pcntl-wexitstatus.xml | 6 +-- reference/pcntl/functions/pcntl-wstopsig.xml | 4 +- reference/pcntl/functions/pcntl-wtermsig.xml | 6 +-- 15 files changed, 162 insertions(+), 110 deletions(-) diff --git a/reference/pcntl/functions/pcntl-async-signals.xml b/reference/pcntl/functions/pcntl-async-signals.xml index 2023479ae5..be39e553ed 100644 --- a/reference/pcntl/functions/pcntl-async-signals.xml +++ b/reference/pcntl/functions/pcntl-async-signals.xml @@ -1,6 +1,5 @@ - pcntl_async_signals @@ -9,12 +8,12 @@ &reftitle.description; - + boolpcntl_async_signals - boolon&null; + boolnullenable&null; - If the on parameter is omitted, + If the enable parameter is &null;, pcntl_async_signals returns whether asynchronous signal handling is enabled. Otherwise, asynchronous signal handling is enabled or disabled. @@ -25,7 +24,7 @@ &reftitle.parameters; - on + enable Whether asynchronous signal handling should be enabled. @@ -38,13 +37,35 @@ &reftitle.returnvalues; - When used as getter (that is without the optional parameter) it returns - whether asynchronous signal handling is enabled. When used as setter (that is - with the optional parameter given), it returns whether asynchronous signal + When used as getter (enable parameter is &null;) it returns + whether asynchronous signal handling is enabled. When used as setter (enable + parameter is not &null;), it returns whether asynchronous signal handling was enabled before the function call. + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + enable is nullable now. + + + + + + + &reftitle.seealso; @@ -53,7 +74,6 @@ - - + pcntl_exec Executes specified program in current process space @@ -9,10 +9,10 @@ &reftitle.description; - voidpcntl_exec + boolpcntl_exec stringpath - arrayargs - arrayenvs + arrayargs[] + arrayenv_vars[] Executes the program with the given arguments. @@ -44,10 +44,10 @@ - envs + env_vars - envs is an array of strings which are passed as + env_vars is an array of strings which are passed as environment to the program. The array is in the format of name => value, the key being the name of the environmental variable and the value being the value of that variable. @@ -61,12 +61,11 @@ &reftitle.returnvalues; - &return.nullorfalse; + Returns &false;. - - + pcntl_getpriority Get the priority of any process @@ -9,13 +9,13 @@ &reftitle.description; - intpcntl_getpriority - intpidgetmypid() - intprocess_identifierPRIO_PROCESS + intfalsepcntl_getpriority + intnullprocess_id&null; + intmodePRIO_PROCESS pcntl_getpriority gets the priority of - pid. Because priority levels can differ between + process_id. Because priority levels can differ between system types and kernel versions, please see your system's getpriority(2) man page for specific details. @@ -26,15 +26,15 @@ - pid + process_id - If not specified, the pid of the current process is used. + If &null;, the pid of the current process is used. - process_identifier + mode One of PRIO_PGRP, PRIO_USER @@ -56,6 +56,28 @@ &return.falseproblem; + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + process_id is nullable now. + + + + + + + &reftitle.seealso; @@ -66,7 +88,6 @@ - - + pcntl_setpriority Change the priority of any process @@ -11,12 +11,12 @@ boolpcntl_setpriority intpriority - intpidgetmypid() - intprocess_identifierPRIO_PROCESS + intnullprocess_id&null; + intmodePRIO_PROCESS pcntl_setpriority sets the priority of - pid. + process_id. @@ -38,15 +38,15 @@ - pid + process_id - If not specified, the pid of the current process is used. + If &null;, the pid of the current process is used. - process_identifier + mode One of PRIO_PGRP, PRIO_USER @@ -65,6 +65,28 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + process_id is nullable now. + + + + + + + &reftitle.seealso; @@ -75,7 +97,6 @@ - - pcntl_signal_get_handler @@ -10,11 +9,11 @@ &reftitle.description; - mixedpcntl_signal_get_handler - intsigno + callableintpcntl_signal_get_handler + intsignal - The pcntl_signal_get_handler function will get the current handler for the specified signo. + The pcntl_signal_get_handler function will get the current handler for the specified signal. @@ -22,7 +21,7 @@ &reftitle.parameters; - signo + signal The signal number. @@ -35,7 +34,8 @@ &reftitle.returnvalues; - This function may return an integer value that refers to SIG_DFL or SIG_IGN. If you set a custom handler a string value containing the function name is returned. + This function may return an integer value that refers to SIG_DFL or SIG_IGN. + If a custom handler has been set, that callable is returned. @@ -95,7 +95,6 @@ var_dump(pcntl_signal_get_handler(SIGUSR1)); // Outputs: int(1) - - pcntl_strerror @@ -10,8 +9,8 @@ &reftitle.description; - stringfalsepcntl_strerror - interrno + stringpcntl_strerror + interror_code @@ -25,7 +24,7 @@ &reftitle.parameters; - errno + error_code @@ -38,7 +37,7 @@ &reftitle.returnvalues; - Returns error description on success&return.falseforfailure;. + Returns error description. @@ -50,7 +49,6 @@ - - + pcntl_wait Waits on or returns the status of a forked child @@ -11,8 +11,8 @@ intpcntl_wait intstatus - intoptions0 - arrayrusage + intflags0 + arrayresource_usage[] The wait function suspends execution of the current process until a @@ -27,7 +27,7 @@ This function is equivalent to calling pcntl_waitpid with a -1 pid and no - options. + flags. @@ -53,18 +53,18 @@ - options + flags If wait3 is available on your system (mostly BSD-style systems), you can - provide the optional options parameter. If this + provide the optional flags parameter. If this parameter is not provided, wait will be used for the system call. If wait3 is not available, providing a value for options will have no effect. The value of options is the value of zero or more of the following two constants OR'ed together: - Possible values for <parameter>options</parameter> + Possible values for <parameter>flags</parameter> @@ -117,7 +117,6 @@ -