File tree Expand file tree Collapse file tree 1 file changed +6
-32
lines changed
reference/pcntl/functions Expand file tree Collapse file tree 1 file changed +6
-32
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 4ac5624be0dc8484a333514b605150e73cad06b8 Maintainer: takagi Status: ready -->
3+ <!-- EN-Revision: b608b323883ac77489a31f8a1aa406e17c202bcb Maintainer: takagi Status: ready -->
44
55<refentry xml : id =" function.pcntl-get-last-error" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
66 <refnamediv >
1515 <void />
1616 </methodsynopsis >
1717 <para >
18- 直前に失敗した pcntl 関数によって設定されたエラー番号 (<literal >errno</literal >) を取得します。
19- エラー番号に関連付けられたシステムエラーメッセージは、 <function >pcntl_strerror</function > を使用して確認できます。
18+
2019 </para >
20+
21+ &warn.undocumented.func;
22+
2123 </refsect1 >
2224
2325 <refsect1 role =" parameters" >
2830 <refsect1 role =" returnvalues" >
2931 &reftitle.returnvalues;
3032 <para >
31- 直前に失敗した pcntl 関数によって設定されたエラー番号 (< literal >errno</ literal >) を返します。エラーが発生していない場合は、 0 を返します 。
33+ エラーコードを返します 。
3234 </para >
3335 </refsect1 >
3436
35- <refsect1 role =" examples" >
36- &reftitle.examples;
37- <example >
38- <title ><function >pcntl_get_last_error</function > の例</title >
39- <para >
40- この例では、存在しない子プロセスを待機しようと試みた後、対応するエラーメッセージを出力します。
41- </para >
42- <programlisting role =" php" >
43- <![CDATA[
44- <?php
45- $pid = pcntl_wait($status);
46- if ($pid === -1) {
47- $errno = pcntl_get_last_error();
48- $message = pcntl_strerror($errno);
49- fwrite(STDERR, 'pcntl_wait がエラー番号' . $errno
50- . 'で失敗しました: ' . $message . PHP_EOL);
51- }
52- ]]>
53- </programlisting >
54- &example.outputs.similar;
55- <screen >
56- <![CDATA[
57- pcntl_wait がエラー番号 10 で失敗しました: 子プロセスが存在しません
58- ]]>
59- </screen >
60- </example >
61- </refsect1 >
62-
6337 <refsect1 role =" seealso" >
6438 &reftitle.seealso;
6539 <simplelist >
You can’t perform that action at this time.
0 commit comments