OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man2 / getpid.2
index 46427dd..b85a777 100644 (file)
@@ -1,6 +1,6 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
-.\"     and Copyright(c) 2008 Akihiro MOTOKI
-.\"         all rights reserved.
-.\" Translated Thu Jun 26 20:33:01 JST 1997
-.\"         by SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
-.\" Updated 2008-10-03, Akihiro MOTOKI, LDP v3.10
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH GETPID 2 2008-09-23 "Linux" "Linux Programmer's Manual"
-.SH Ì¾Á°
-getpid, getppid \- ¥×¥í¥»¥¹ ID ¤òÆÀ¤ë
-.SH ½ñ¼°
-.B #include <sys/types.h>
+.\"*******************************************************************
+.TH GETPID 2 2008\-09\-23 Linux "Linux Programmer's Manual"
+.SH 名前
+getpid, getppid \- プロセス ID を得る
+.SH 書式
+\fB#include <sys/types.h>\fP
 .br
-.B #include <unistd.h>
+\fB#include <unistd.h>\fP
 .sp
-.B pid_t getpid(void);
+\fBpid_t getpid(void);\fP
 .br
-.B pid_t getppid(void);
-.SH ÀâÌÀ
-.BR getpid ()
-¤Ï¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹ ID ¤òÊÖ¤¹¡£(¥Æ¥ó¥Ý¥é¥êÍѤΥե¡¥¤¥ë̾¤È¤·¤Æ
-¾¤È½Å¤Ê¤é¤Ê¤¤Ì¾Á°¤òÀ¸À®¤¹¤ë¥ë¡¼¥Á¥ó¤Ç¤·¤Ð¤·¤Ð»ÈÍѤµ¤ì¤ë¡£)
+\fBpid_t getppid(void);\fP
+.SH 説明
+\fBgetpid\fP()  は呼び出し元のプロセスのプロセス ID を返す。(テンポラリ用のファイル名として
+他と重ならない名前を生成するルーチンでしばしば使用される。)
 
-.BR getppid ()
-¤Ï¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤Î¿Æ¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹ ID ¤òÊÖ¤¹¡£
-.SH ¥¨¥é¡¼
-¤³¤ì¤é¤Î´Ø¿ô¤Ï¾ï¤ËÀ®¸ù¤¹¤ë¡£
-.SH ½àµò
-POSIX.1-2001, 4.3BSD, SVr4.
-.SH Ãí°Õ
-glibc ¥Ð¡¼¥¸¥ç¥ó 2.3.4 °Ê¹ß¤Ç¤Ï¡¢
-glibc ¤Î
-.BR getpid ()
-¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï PID ¤ò¥­¥ã¥Ã¥·¥å¤¹¤ë¡£
-¤³¤ì¤Ï¡¢¥×¥í¥»¥¹¤¬·«¤êÊÖ¤·
-.BR getpid ()
-¤ò¸Æ¤Ó½Ð¤·¤¿¾ì¹ç¤Ë¤½¤ÎÅÔÅÙ¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò¸Æ¤Ö¤Î¤òÈò¤±¤ë¤¿¤á¤Ç¤¢¤ë¡£
-Ä̾ï¤Ï¡¢¤³¤Î¥­¥ã¥Ã¥·¥å½èÍý¤¬¸«¤¨¤ë¤³¤È¤Ï¤Ê¤¤¤¬¡¢
-¥­¥ã¥Ã¥·¥å½èÍý¤¬Àµ¤·¤¯Æ¯¤¯¤¿¤á¤Ë¤Ï
-.BR fork (2),
-.BR vfork (2),
-.BR clone (2)
-¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ç¤Î¥µ¥Ý¡¼¥È¤¬É¬ÍפǤ¢¤ë¡£
-¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò¸Æ¤Ó½Ð¤¹ºÝ¤Ë¡¢
-glibc ¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤ò·Ðͳ¤»¤º¤Ë
-.BR syscall (2)
-¤ò»È¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢»Ò¥×¥í¥»¥¹¤Ç
-.BR getpid ()
-¤ò¸Æ¤Ó½Ð¤¹¤È´Ö°ã¤Ã¤¿Ãͤ¬Ê֤뤳¤È¤À¤í¤¦
-(Àµ³Î¤Ë¤¤¤¦¤È¡¢¿Æ¥×¥í¥»¥¹¤Î PID ¤¬ÊÖ¤µ¤ì¤ë)¡£
+\fBgetppid\fP()  は呼び出し元のプロセスの親プロセスのプロセス ID を返す。
+.SH エラー
+これらの関数は常に成功する。
+.SH 準拠
+POSIX.1\-2001, 4.3BSD, SVr4.
+.SH 注意
 .\" The following program demonstrates this "feature":
 .\"
 .\" #define _GNU_SOURCE
@@ -96,19 +73,18 @@ glibc 
 .\"    }
 .\"    wait(NULL);
 .\"}
-.BR clone (2)
-¤ò glibc ¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô·Ðͳ¤Çµ¯Æ°¤·¤¿ºÝ¤Ë¤â
-.BR getpid ()
-¤¬´Ö°ã¤Ã¤¿ÃͤòÊÖ¤¹¾ì¹ç¤¬¤¢¤ê¡¢¤³¤ì¤Ë´Ø¤¹¤ëµÄÏÀ¤Ï
-.BR clone (2)
-¤â»²¾È¤·¤Æ¤Û¤·¤¤¡£
-.SH ´ØÏ¢¹àÌÜ
-.BR clone (2),
-.BR fork (2),
-.BR kill (2),
-.BR exec (3),
-.BR mkstemp (3),
-.BR tempnam (3),
-.BR tmpfile (3),
-.BR tmpnam (3),
-.BR credentials (7)
+glibc バージョン 2.3.4 以降では、 glibc の \fBgetpid\fP()  のラッパー関数は PID をキャッシュする。
+これは、プロセスが繰り返し \fBgetpid\fP()  を呼び出した場合にその都度システムコールを呼ぶのを避けるためである。
+通常は、このキャッシュ処理が見えることはないが、 キャッシュ処理が正しく働くためには \fBfork\fP(2), \fBvfork\fP(2),
+\fBclone\fP(2)  のラッパー関数でのサポートが必要である。 アプリケーションがこれらのシステムコールを呼び出す際に、 glibc
+のラッパー関数を経由せずに \fBsyscall\fP(2)  を使った場合には、子プロセスで \fBgetpid\fP()
+を呼び出すと間違った値が返ることだろう (正確にいうと、親プロセスの PID が返される)。 \fBclone\fP(2)  を glibc
+のラッパー関数経由で起動した際にも \fBgetpid\fP()  が間違った値を返す場合があり、これに関する議論は \fBclone\fP(2)
+も参照してほしい。
+.SH 関連項目
+\fBclone\fP(2), \fBfork\fP(2), \fBkill\fP(2), \fBexec\fP(3), \fBmkstemp\fP(3),
+\fBtempnam\fP(3), \fBtmpfile\fP(3), \fBtmpnam\fP(3), \fBcredentials\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。