From 6b6c4354298a3d1e639074733f3ae48b938c4fc3 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Mon, 7 Sep 2026 10:20:45 +0200 Subject: [PATCH] [Sync-En] pcntl_wait, pcntl_waitpid: document the resource_usage parameter --- reference/pcntl/functions/pcntl-wait.xml | 22 +++++- reference/pcntl/functions/pcntl-waitid.xml | 22 +++--- reference/pcntl/functions/pcntl-waitpid.xml | 82 ++++++++++++++++++++- 3 files changed, 113 insertions(+), 13 deletions(-) diff --git a/reference/pcntl/functions/pcntl-wait.xml b/reference/pcntl/functions/pcntl-wait.xml index acb8d6cf5f..28a055ce7a 100644 --- a/reference/pcntl/functions/pcntl-wait.xml +++ b/reference/pcntl/functions/pcntl-wait.xml @@ -1,6 +1,5 @@ - - + @@ -91,6 +90,25 @@ + + resource_usage + + + El parámetro resource_usage se establece en un + array asociativo que contiene estadísticas de uso de + recursos del proceso hijo. Para el detalle de su contenido, véase + getrusage. + + + Esto solo se admite si la llamada al sistema + wait3(2) está disponible en el sistema; en caso + contrario, el parámetro se deja sin modificar. + Si no se ha recogido ningún proceso hijo, es decir si la función devuelve + 0 o -1, el parámetro se establece + en un array vacío. + + + diff --git a/reference/pcntl/functions/pcntl-waitid.xml b/reference/pcntl/functions/pcntl-waitid.xml index 2498fdbff6..693d92133b 100644 --- a/reference/pcntl/functions/pcntl-waitid.xml +++ b/reference/pcntl/functions/pcntl-waitid.xml @@ -1,5 +1,5 @@ - + @@ -250,14 +250,18 @@ resource_usage - - El parámetro resource_usage se establece en un array - que contiene estadísticas de uso de recursos del proceso hijo. - - Esto se admite ya sea si la llamada al sistema wait6 está disponible - (por ejemplo, en FreeBSD), o en Linux a través de la llamada al sistema - waitid en bruto. - + + El parámetro resource_usage se establece en un + array asociativo que contiene estadísticas de uso de + recursos del proceso hijo. Para el detalle de su contenido, véase + getrusage. + + + Esto solo se admite si la llamada al sistema + wait6(2) está disponible, por ejemplo en FreeBSD, o en + Linux a través de la llamada al sistema waitid(2) en + bruto; en caso contrario, el parámetro se deja sin modificar. + diff --git a/reference/pcntl/functions/pcntl-waitpid.xml b/reference/pcntl/functions/pcntl-waitpid.xml index cfac082ea7..37b50ff65e 100644 --- a/reference/pcntl/functions/pcntl-waitpid.xml +++ b/reference/pcntl/functions/pcntl-waitpid.xml @@ -1,6 +1,5 @@ - - + @@ -134,6 +133,25 @@ + + resource_usage + + + El parámetro resource_usage se establece en un + array asociativo que contiene estadísticas de uso de + recursos del proceso hijo. Para el detalle de su contenido, véase + getrusage. + + + Esto solo se admite si la llamada al sistema + wait4(2) está disponible en el sistema; en caso + contrario, el parámetro se deja sin modificar. + Si no se ha recogido ningún proceso hijo, es decir si la función devuelve + 0 o -1, el parámetro se establece + en un array vacío. + + + @@ -148,12 +166,72 @@ + + &reftitle.examples; + + Ejemplo con <function>pcntl_waitpid</function> + + + + + + &reftitle.seealso; pcntl_fork pcntl_signal + pcntl_wait pcntl_wifexited pcntl_wifstopped pcntl_wifsignaled