mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 07:02:09 +01:00
183 lines
5.1 KiB
XML
183 lines
5.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: af704f619e3f35940b874459ca7c625308e8968c Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,leonardolara -->
|
|
<refentry xml:id='function.proc-get-status' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>proc_get_status</refname>
|
|
<refpurpose>Obtem informação sobre um processo aberto por <function>proc_open</function></refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>proc_get_status</methodname>
|
|
<methodparam><type>resource</type><parameter>process</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>proc_get_status</function> obtém dados sobre um
|
|
processo aberto usando <function>proc_open</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>process</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
O recurso to tipo <type>resource</type> gerado por <function>proc_open</function> que será
|
|
avaliado.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Um <type>array</type> com a informação coletada.
|
|
O array retornado contém os seguintes elementos:
|
|
</para>
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row><entry>elemento</entry><entry>type</entry><entry>descrição</entry></row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>command</entry>
|
|
<entry><type>string</type></entry>
|
|
<entry>
|
|
A string de comando que foi passada para <function>proc_open</function>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>pid</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>Id do processo</entry>
|
|
</row>
|
|
<row>
|
|
<entry>running</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
&true; se o processo ainda está sendo executado, &false; se ele
|
|
terminou.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>signaled</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
&true; se o processo filho terminou por um sinal
|
|
não capturado. Sempre definido como &false; no Windows.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>stopped</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
&true; se o processo filho foi parado por um
|
|
sinal. Sempre definido como &false; no Windows.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>exitcode</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>
|
|
O código de saída retornado pelo processo (que é
|
|
significativo somente se <literal>running</literal> for &false;).
|
|
Antes do PHP 8.3.0, apenas a primeira chamada a esta função retornava o valor
|
|
real, a chamada seguinte retornava <literal>-1</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>cached</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
A partir do PHP 8.3.0, isto é &true; quando o código de saída está em cache.
|
|
O cache é necessário para garantir que o código de saída não é perdido por
|
|
chamadas subsequentes a APIs de processos.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>termsig</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>
|
|
O número do sinal que fez o processo filho terminar a sua execução
|
|
(somente significativo se <literal>signaled</literal> for &true;)
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>stopsig</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>
|
|
O número do sinal que fez o processo filho terminar a sua execução
|
|
(somente significativo se <literal>stopped</literal> for &true;)
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.3.0</entry>
|
|
<entry>
|
|
A entrada <literal>"cached"</literal> foi adicionada ao array
|
|
retornado. Antes do PHP 8.3.0, apenas a primeira chamada retornava o código de
|
|
saída real. A entrada <literal>"cached"</literal> indica que o código de saída
|
|
foi armazenado em cache.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>proc_open</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|