OSDN Git Service

(split) LDP: Update drafts based on LDP v3.40.
[linuxjm/LDP_man-pages.git] / draft / man3 / popen.3
index b1983cf..86cff5d 100644 (file)
 .\" Modified Sat May 18 20:37:44 1996 by Martin Schulze (joey@linux.de)
 .\" Modified 7 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk)
 .\"
-.\" Japanese Version Copyright (c) 1997 Takashi Yoshino
-.\"       all rights reserved.
-.\" Translated 1997-01-21, Takashi Yoshino <tyoshino@eng.toyo.ac.jp>
-.\" Modified 2007-05-03, Akihiro MOTOKI
-.\" Modified 2008-11-09, Akihiro MOTOKI, LDP v3.13
+.\"*******************************************************************
 .\"
-.TH POPEN 3  2010-02-03 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O popen, pclose \- pipe stream to or from a process
-.SH Ì¾Á°
-popen, pclose \- ¥×¥í¥»¥¹¤È¤ÎÆþÎÏ/½ÐÎÏÍѤΥѥ¤¥×¡¦¥¹¥È¥ê¡¼¥à
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH POPEN 3 2010\-02\-03 GNU "Linux Programmer's Manual"
+.SH 名前
+popen, pclose \- プロセスとの入力/出力用のパイプストリーム
+.SH 書式
 .nf
-.B #include <stdio.h>
+\fB#include <stdio.h>\fP
 .sp
-.BI "FILE *popen(const char *" command ", const char *" type );
+\fBFILE *popen(const char *\fP\fIcommand\fP\fB, const char *\fP\fItype\fP\fB);\fP
 .sp
-.BI "int pclose(FILE *" stream );
+\fBint pclose(FILE *\fP\fIstream\fP\fB);\fP
 .fi
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .ad l
 .in
 .sp
-.BR popen (),
-.BR pclose ():
+\fBpopen\fP(), \fBpclose\fP():
+.RS 4
 _POSIX_C_SOURCE\ >=\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE
+.RE
 .ad b
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The
-.\"O .BR popen ()
-.\"O function opens a process by creating a pipe, forking, and invoking the
-.\"O shell.
-.\"O Since a pipe is by definition unidirectional, the
-.\"O .I type
-.\"O argument may specify only reading or writing, not both; the resulting
-.\"O stream is correspondingly read-only or write-only.
-.BR popen ()
-´Ø¿ô¤Ï¡¢¥×¥í¥»¥¹¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£¶ñÂÎŪ¤Ë¤Ï¡¢
-¥Ñ¥¤¥×¤òÀ¸À®¤·¡¢¥Õ¥©¡¼¥¯¤ò¹Ô¤¤¡¢¥·¥§¥ë¤òµ¯Æ°¤¹¤ë¡£
-ÄêµÁ¤«¤éʬ¤«¤ë¤è¤¦¤Ë¡¢¥Ñ¥¤¥×¤Ï°ìÊý¸þ¤Ê¤Î¤Ç¡¢
-.I type
-°ú¤­¿ô¤Ë¤ÏÆɤ߹þ¤ß¤«½ñ¤­¹þ¤ß¤Î¤É¤Á¤é¤«°ìÊý¤À¤±¤ò»ØÄê¤Ç¤­¤ë
-(ξÊý¤Ï»ØÄê¤Ç¤­¤Ê¤¤)¡£
-À¸À®¤µ¤ì¤ë¥¹¥È¥ê¡¼¥à¤Ï¡¢¤³¤Î»ØÄê¤ËÂбþ¤·¤Æ¡¢Æɤ߼è¤êÀìÍѤޤ¿¤Ï
-½ñ¤­¹þ¤ßÀìÍѤΤ¤¤º¤ì¤«¤È¤Ê¤ë¡£
+.SH 説明
+\fBpopen\fP()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、フォークを行い、シェルを起動する。
+定義から分かるように、パイプは一方向なので、 \fItype\fP 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方は指定できない)。
+生成されるストリームは、この指定に対応して、読み取り専用または 書き込み専用のいずれかとなる。
 .PP
-.\"O The
-.\"O .I command
-.\"O argument is a pointer to a null-terminated string containing a shell
-.\"O command line.
-.\"O This command is passed to
-.\"O .I /bin/sh
-.\"O using the
-.\"O .B \-c
-.\"O flag; interpretation, if any, is performed by the shell.
-.\"O The
-.\"O .I type
-.\"O argument is a pointer to a null-terminated string which must contain
-.\"O either the letter \(aqr\(aq for reading or the letter \(aqw\(aq for writing.
-.I command
-°ú¤­¿ô¤Ï¡¢¥·¥§¥ë¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó¤ò´Þ¤à
-NULL ½ªÃ¼¤µ¤ì¤¿Ê¸»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
-¤³¤Î¥³¥Þ¥ó¥É¤Ï
-.B \-c
-¥Õ¥é¥°¤òÍѤ¤¤Æ
-.I /bin/sh
-¤ËÅϤµ¤ì¤ë¡£
-¥³¥Þ¥ó¥É¤Î²ò¼á¤Ï (¤â¤·É¬Íפʤé¤Ð) ¥·¥§¥ë¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¡£
-.I type
-°ú¤­¿ô¤Ï¡¢NULL ½ªÃ¼¤µ¤ì¤¿Ê¸»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¡¢
-Æɤ߹þ¤ß¤ò¼¨¤¹Ê¸»ú \(aqr\(aq ¤«¡¢½ñ¤­¹þ¤ß¤ò¼¨¤¹Ê¸»ú \(aqw\(aq ¤Î
-¤É¤Á¤é¤«°ìÊý¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O Since glibc 2.9,
-.\"O this argument can additionally include the letter \(aqe\(aq,
-.\"O which causes the close-on-exec flag
-.\"O .RB ( FD_CLOEXEC )
-.\"O to be set on the underlying file descriptor;
-.\"O see the description of the
-.\"O .B O_CLOEXEC
-.\"O flag in
-.\"O .BR open (2)
-.\"O for reasons why this may be useful.
-glibc 2.9 °Ê¹ß¤Ç¤Ï¡¢¤³¤Î°ú¤­¿ô¤Ëʸ»ú \(aqe\(aq ¤òÄɲäǻØÄê¤Ç¤­¤ë¡£
-ʸ»ú \(aqe\(aq ¤ò»ØÄꤹ¤ë¤È¡¢
-Âбþ¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ë¤ª¤¤¤Æ¡¢
-close-on-exec ¥Õ¥é¥°
-.RB ( FD_CLOEXEC )
-¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
-¤³¤ì¤¬Ìò¤ËΩ¤ÄÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
-.BR open (2)
-¤Î
-.B O_CLOEXEC
-¥Õ¥é¥°¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£
+\fIcommand\fP 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポインタである。 このコマンドは \fB\-c\fP フラグを用いて
+\fI/bin/sh\fP に渡される。 コマンドの解釈は (もし必要ならば) シェルによって行われる。 \fItype\fP 引き数は、NULL
+終端された文字列へのポインタで、 読み込みを示す文字 \(aqr\(aq か、書き込みを示す文字 \(aqw\(aq の
+どちらか一方を指定しなければならない。 glibc 2.9 以降では、この引き数に文字 \(aqe\(aq を追加で指定できる。 文字
+\(aqe\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close\-on\-exec フラグ (\fBFD_CLOEXEC\fP)
+がセットされる。 これが役に立つ理由については、 \fBopen\fP(2)  の \fBO_CLOEXEC\fP フラグの説明を参照のこと。
 .PP
-.\"O The return value from
-.\"O .BR popen ()
-.\"O is a normal standard I/O stream in all respects save that it must be closed
-.\"O with
-.\"O .BR pclose ()
-.\"O rather than
-.\"O .BR fclose (3).
-.BR popen ()
-¤«¤é¤ÎÊÖ¤êÃͤϡ¢Ä̾ï¤Îɸ½à I/O ¥¹¥È¥ê¡¼¥à¤ÈƱ¤¸¤Ç¤¢¤ë¤¬¡¢
-.BR fclose (3)
-¤Ç¤Ï¤Ê¤¯
-.BR pclose ()
-¤ÇÊĤ¸¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤³¤È¤À¤±¤¬°Û¤Ê¤ë¡£
-.\"O Writing to such a stream writes to the standard input of the command; the
-.\"O command's standard output is the same as that of the process that called
-.\"O .BR popen (),
-.\"O unless this is altered by the command itself.
-.\"O Conversely, reading from a
-.\"O "popened" stream reads the command's standard output, and the command's
-.\"O standard input is the same as that of the process that called
-.\"O .BR popen ().
-¤³¤Î¥¹¥È¥ê¡¼¥à¤Ø½ñ¤­¹þ¤ó¤À·ë²Ì¤Ï¥³¥Þ¥ó¥É¤Îɸ½àÆþÎϤ˽ñ¤­¹þ¤Þ¤ì¤ë¡£
-¤½¤·¤Æ¡¢¥³¥Þ¥ó¥É¤Îɸ½à½ÐÎϤϡ¢
-¥³¥Þ¥ó¥É¤½¤Î¤â¤Î¤¬ÃÖ¤­´¹¤ï¤Ã¤Æ¤·¤Þ¤ï¤Ê¤¤¸Â¤ê¡¢
-.BR popen ()
-¤ò¸Æ¤ó¤À¥×¥í¥»¥¹¤Îɸ½à½ÐÎϤÈƱ¤¸¤³¤È¤Ë¤Ê¤ë¡£
-µÕ¤Ë¡¢"popened"
-.RB ( popen ()
-¤Ë¤è¤Ã¤Æ³«¤«¤ì¤¿) ¥¹¥È¥ê¡¼¥à¤«¤é¤ÎÆɤ߹þ¤ß¤Ï¡¢
-¤½¤Î¥³¥Þ¥ó¥É¤Îɸ½à½ÐÎϤòÆɤ߹þ¤à¤³¤È¤Ë¤Ê¤ë¡£
-¤½¤·¤Æ¡¢¤½¤Î¥³¥Þ¥ó¥É¤Îɸ½àÆþÎϤÏ
-.BR popen ()
-¤ò¸Æ¤ó¤À¥×¥í¥»¥¹¤Îɸ½àÆþÎϤÈƱ°ì¤Ç¤¢¤ë¡£
+\fBpopen\fP()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 \fBfclose\fP(3)  ではなく \fBpclose\fP()
+で閉じなくてはならないことだけが異なる。 このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コマンドの標準出力は、
+コマンドそのものが置き換わってしまわない限り、 \fBpopen\fP()  を呼んだプロセスの標準出力と同じことになる。 逆に、"popened"
+(\fBpopen\fP()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読み込むことになる。
+そして、そのコマンドの標準入力は \fBpopen\fP()  を呼んだプロセスの標準入力と同一である。
 .PP
-.\"O Note that output
-.\"O .BR popen ()
-.\"O streams are fully buffered by default.
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
-.BR popen ()
-¤Î½ÐÎÏ¥¹¥È¥ê¡¼¥à¤Ï´°Á´¤Ë¥Ð¥Ã¥Õ¥¡¥ê¥ó¥°¤µ¤ì¤ë¤³¤È¤ËÃí°Õ¤·¤è¤¦¡£
+デフォルトでは、 \fBpopen\fP()  の出力ストリームは完全にバッファリングされることに注意しよう。
 .PP
-.\"O The
-.\"O .BR pclose ()
-.\"O function waits for the associated process to terminate and returns the exit
-.\"O status of the command as returned by
-.\"O .BR wait4 (2).
-.BR pclose ()
-´Ø¿ô¤Ï¡¢(¥Ñ¥¤¥×¤Ë) ´ØÏ¢¤Å¤±¤é¤ì¤¿¥×¥í¥»¥¹¤¬½ªÎ»¤¹¤ë¤Î¤òÂÔ¤Á¡¢
-.BR wait4 (2)
-¤Ë¤è¤Ã¤ÆÊÖ¤µ¤ì¤¿¥³¥Þ¥ó¥É¤Î½ªÎ»¾õÂÖ¤òÊÖ¤¹¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O The
-.\"O .BR popen ()
-.\"O function returns NULL if the
-.\"O .BR fork (2)
-.\"O or
-.\"O .BR pipe (2)
-.\"O calls fail, or if it cannot allocate memory.
-.BR popen ()
-´Ø¿ô¤Ï¡¢
-.BR fork (2)
-¤Þ¤¿¤Ï
-.BR pipe (2)
-¸Æ¤Ó½Ð¤·¤¬¼ºÇÔ¤·¤¿¾ì¹ç¤ä¡¢
-¥á¥â¥ê³ä¤êÅö¤Æ¤¬¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¡¢ NULL ¤òÊÖ¤¹¡£
+\fBpclose\fP()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 \fBwait4\fP(2)
+によって返されたコマンドの終了状態を返す。
+.SH 返り値
+\fBpopen\fP()  関数は、 \fBfork\fP(2)  または \fBpipe\fP(2)  呼び出しが失敗した場合や、 メモリ割り当てができなかった場合、
+NULL を返す。
 .PP
-.\"O The
-.\"O .BR pclose ()
-.\"O function returns \-1 if
-.\"O .\" These conditions actually give undefined results, so I commented
-.\"O .\" them out.
-.\"O .\" .I stream
-.\"O .\" is not associated with a "popen()ed" command, if
-.\"O .\".I stream
-.\"O .\" already "pclose()d", or if
-.\"O .BR wait4 (2)
-.\"O returns an error, or some other error is detected.
-.BR pclose ()
-´Ø¿ô¤Ï¡¢
-.BR wait4 (2)
-¤¬¥¨¥é¡¼¤òÊÖ¤·¤¿¤ê¡¢²¿¤«Â¾¤Î¥¨¥é¡¼¤¬¸«¤Ä¤«¤Ã¤¿¾ì¹ç¡¢
-\-1 ¤òÊÖ¤¹¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.\"O The
-.\"O .BR popen ()
-.\"O function does not set
-.\"O .I errno
-.\"O if memory allocation fails.
-.\"O If the underlying
-.\"O .BR fork (2)
-.\"O or
-.\"O .BR pipe (2)
-.\"O fails,
-.\"O .I errno
-.\"O is set appropriately.
-.\"O If the
-.\"O .I type
-.\"O argument is invalid, and this condition is detected,
-.\"O .I errno
-.\"O is set to
-.\"O .BR EINVAL .
-.BR popen ()
-´Ø¿ô¤Ï¡¢¥á¥â¥ê¥¢¥í¥±¡¼¥·¥ç¥ó¤Ë¼ºÇÔ¤·¤Æ¤â
-.I errno
-¤ò¥»¥Ã¥È¤·¤Ê¤¤¡£
-.BR popen ()
-¤¬Ãæ¤Ç¸Æ¤Ó½Ð¤¹
-.BR fork (2)
-¤ä
-.BR pipe (2)
-¤¬¼ºÇÔ¤·¤¿¾ì¹ç¤Ë¤Ï¡¢
-.I errno
-¤¬Å¬Àڤ˥»¥Ã¥È¤µ¤ì¤ë¡£
-°ú¤­¿ô
-.I type
-¤¬Ìµ¸ú¤Ç¤¢¤ê¡¢¤³¤Î¾õÂÖ¤¬¸¡ÃΤµ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢
-.I errno
-¤¬
-.B EINVAL
-¤Ë¥»¥Ã¥È¤µ¤ì¤ë¡£
+.\" These conditions actually give undefined results, so I commented
+.\" them out.
+.\" .I stream
+.\" is not associated with a "popen()ed" command, if
+.\".I stream
+.\" already "pclose()d", or if
+\fBpclose\fP()  関数は、 \fBwait4\fP(2)  がエラーを返したり、何か他のエラーが見つかった場合、 \-1 を返す。
+.SH エラー
+\fBpopen\fP()  関数は、メモリアロケーションに失敗しても \fIerrno\fP をセットしない。 \fBpopen\fP()  が中で呼び出す
+\fBfork\fP(2)  や \fBpipe\fP(2)  が失敗した場合には、 \fIerrno\fP が適切にセットされる。 引き数 \fItype\fP
+が無効であり、この状態が検知された場合には、 \fIerrno\fP が \fBEINVAL\fP にセットされる。
 .PP
-.\"O If
-.\"O .BR pclose ()
-.\"O cannot obtain the child status,
-.\"O .I errno
-.\"O is set to
-.\"O .BR ECHILD .
-.BR pclose ()
-¤¬¡¢»Ò¥×¥í¥»¥¹¤Î¾õÂÖ¤ò¼èÆÀ¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¡¢
-.I errno
-¤¬
-.B ECHILD
-¤Ë¥»¥Ã¥È¤µ¤ì¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-POSIX.1-2001.
+\fBpclose\fP()  が、子プロセスの状態を取得できなかった場合、 \fIerrno\fP が \fBECHILD\fP にセットされる。
+.SH 準拠
+POSIX.1\-2001.
 
-.\"O The \(aqe\(aq value for
-.\"O .I type
-.\"O is a Linux extension.
-.I type
-¤Ë»ØÄê¤Ç¤­¤ë \(aqe\(aq ¤Ï Linux ¤Ç¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
-.\"O .SH BUGS
-.SH ¥Ð¥°
-.\"O Since the standard input of a command opened for reading shares its seek
-.\"O offset with the process that called
-.\"O .BR popen (),
-.\"O if the original process has done a buffered read, the command's input
-.\"O position may not be as expected.
-.\"O Similarly, the output from a command
-.\"O opened for writing may become intermingled with that of the original
-.\"O process.
-.\"O The latter can be avoided by calling
-.\"O .BR fflush (3)
-.\"O before
-.\"O .BR popen ().
-Æɤ߹þ¤ß¤Î¤¿¤á¤Ë³«¤«¤ì¤¿¥³¥Þ¥ó¥É¤Îɸ½àÆþÎϤÏ
-.BR popen (),
-¤ò¸Æ¤ó¤À¥×¥í¥»¥¹¤È°ì½ï¤Ë¡¢¤½¤ÎÆɤ߼è¤ê°ÌÃÖ¤ò¶¦Í­¤¹¤ë¡£
-¤½¤Î¤¿¤á¡¢¤â¤È¤Î¥×¥í¥»¥¹¤¬¥Ð¥Ã¥Õ¥¡¥ê¥ó¥°¤µ¤ì¤¿Æɤ߼è¤ê¤ò½ªÎ»¤·¤¿¤é¡¢
-¤½¤Î¥³¥Þ¥ó¥É¤ÎÆþÎÏ°ÌÃÖ¤ÏͽÁÛ¤µ¤ì¤¿¤â¤Î¤Ë¤Ï
-¤Ê¤Ã¤Æ¤¤¤Ê¤¤¤«¤â¤·¤ì¤Ê¤¤¡£
-ƱÍͤˡ¢½ñ¤­¹þ¤ß¤Î¤¿¤á¤Ë³«¤«¤ì¤¿¥³¥Þ¥ó¥É¤«¤é¤Î½ÐÎϤϡ¢
-¤â¤È¤Î¥×¥í¥»¥¹¤Î½ÐÎϤȺ®¤¶¤ê¹ç¤¦¤³¤È¤Ë¤Ê¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-¸å¼Ô¤Ï
-.BR popen ()
-¤ÎÁ°¤Ë
-.BR fflush (3)
-¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤Ë¤è¤Ã¤Æ²óÈò²Äǽ¤Ç¤¢¤ë¡£
+\fItype\fP に指定できる \(aqe\(aq は Linux での拡張である。
+.SH バグ
+読み込みのために開かれたコマンドの標準入力は \fBpopen\fP(), を呼んだプロセスと一緒に、その読み取り位置を共有する。
+そのため、もとのプロセスがバッファリングされた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なっていないかもしれない。
+同様に、書き込みのために開かれたコマンドからの出力は、 もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は \fBpopen\fP()  の前に
+\fBfflush\fP(3)  を呼び出すことによって回避可能である。
 .PP
-.\"O Failure to execute the shell is indistinguishable from the shell's failure
-.\"O to execute command, or an immediate exit of the command.
-.\"O The only hint is an exit status of 127.
-¥·¥§¥ë¤Î¼Â¹Ô¤Î¼ºÇԤϡ¢
-¥·¥§¥ë¤¬¥³¥Þ¥ó¥É¤Î¼Â¹Ô¤Ë¼ºÇÔ¤·¤¿¤³¤È¤ä¡¢
-¥³¥Þ¥ó¥É¤¬¤¹¤°¤Ë½ªÎ»¤·¤Æ¤·¤Þ¤Ã¤¿¤³¤È¤È¡¢¶èÊ̤¬¤Ä¤«¤Ê¤¤¡£
-Í£°ì¤Î¥Ò¥ó¥È¤Ï½ªÎ»¾õÂÖ¤¬ 127 ¤Ë¤Ê¤ë¤³¤È¤Ç¤¢¤ë¡£
-.\"O .\" .SH HISTORY
-.\" .SH ÍúÎò
-.\"O .\" A
-.\"O .\" .BR popen ()
-.\"O .\" and a
-.\"O .\" .BR pclose ()
-.\"O .\" function appeared in Version 7 AT&T UNIX.
+.\" .SH HISTORY
+.\" A
 .\" .BR popen ()
-.\" ´Ø¿ô¤È
+.\" and a
 .\" .BR pclose ()
-.\" ´Ø¿ô¤Ï AT&T UNIX ¤Î Version 7 ¤«¤éƳÆþ¤µ¤ì¤¿¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR sh (1),
-.BR fork (2),
-.BR pipe (2),
-.BR wait4 (2),
-.BR fclose (3),
-.BR fflush (3),
-.BR fopen (3),
-.BR stdio (3),
-.BR system (3)
+.\" function appeared in Version 7 AT&T UNIX.
+シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがすぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が
+127 になることである。
+.SH 関連項目
+\fBsh\fP(1), \fBfork\fP(2), \fBpipe\fP(2), \fBwait4\fP(2), \fBfclose\fP(3), \fBfflush\fP(3),
+\fBfopen\fP(3), \fBstdio\fP(3), \fBsystem\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。