mirror of
https://github.com/php/doc-ja.git
synced 2026-03-24 07:02:08 +01:00
188 lines
5.5 KiB
XML
188 lines
5.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: af704f619e3f35940b874459ca7c625308e8968c Maintainer: hirokawa Status: ready -->
|
|
<!-- CREDITS: shimooka -->
|
|
<refentry xml:id='function.proc-get-status' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>proc_get_status</refname>
|
|
<refpurpose><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> は、<function>proc_open</function>
|
|
で開かれたプロセスに関する情報を取得します。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>process</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
評価される <function>proc_open</function> <type>resource</type>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
集められた情報を <type>array</type> として返します。
|
|
返される配列は次のような要素を持ちます:
|
|
</para>
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row><entry>要素</entry><entry>型</entry><entry>説明</entry></row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>command</entry>
|
|
<entry><type>string</type></entry>
|
|
<entry>
|
|
<function>proc_open</function> に指定されたコマンド文字列。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>pid</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>プロセス ID</entry>
|
|
</row>
|
|
<row>
|
|
<entry>running</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
もしプロセスがまだ動いている場合は、&true; 、すでに終了している場合は
|
|
&false;。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>signaled</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
子プロセスが、キャッチされていないシグナルにより終了した場合に
|
|
&true; となります。Windows では常に &false; にセットされます。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>stopped</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
子プロセスが、シグナルにより停止した時に &true; となります。
|
|
Windows では常に &false; にセットされます。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>exitcode</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>
|
|
プロセスが返した終了コード
|
|
(<literal>running</literal> が &false; の時のみ意味を持ちます)。
|
|
PHP 8.3.0 より前のバージョンでは、
|
|
正しい値を返すのは関数を最初にコールした時のみで、次に
|
|
コールした際には <literal>-1</literal> を返していました。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>cached</entry>
|
|
<entry><type>bool</type></entry>
|
|
<entry>
|
|
PHP 8.3.0 以降、終了コードがキャッシュされた場合に &true; を返します。
|
|
キャッシュは、この関数を後にコールした場合でも、
|
|
終了コードを失わないようにするために必要です。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>termsig</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>
|
|
プロセスを終了させたシグナルの番号です (<literal>signaled</literal> が
|
|
&true; の時のみ意味を持ちます)。
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>stopsig</entry>
|
|
<entry><type>int</type></entry>
|
|
<entry>
|
|
プロセスを停止させたシグナルの番号です (<literal>stopped</literal> が
|
|
&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>
|
|
返される配列に <literal>"cached"</literal>
|
|
エントリが含まれるようになりました。
|
|
PHP 8.3.0 より前のバージョンでは、
|
|
最初にこの関数がコールされた場合にのみ、
|
|
正しい終了コードを返していました。
|
|
<literal>"cached"</literal> エントリは、
|
|
終了コードがキャッシュされていることを示します。
|
|
</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
|
|
-->
|