OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / tempnam.3
index 49eead0..8b24216 100644 (file)
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
-.\" Japanese Version Copyright (c) 1997-2000 Kazuyuki Tanisako and NAKANO Takeo
-.\"         all rights reserved.
-.\" Translated 1997-05-17, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
-.\" Modified 1997-05-27, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
-.\" Modified 1998-02-04, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
-.\" Updated and Modified 2000-10-12, NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Updated 2006-04-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.29
-.\" Updated 2006-07-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
+.\"*******************************************************************
 .\"
-.\"WORD:       temporary file          テンポラリファイル
-.\"WORD:       filename                ファイル名
-.\"WORD:       function                関数
-.\"WORD:       directory               ディレクトリ
-.\"WORD:       environment variable    環境変数
-.\"WORD:       argument                引き数
-.\"WORD:       storage                 保存領域
-.\"WORD:       pointer                 ポインター
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH TEMPNAM 3  2008-08-06 "" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\"*******************************************************************
+.TH TEMPNAM 3 2008\-08\-06 "" "Linux Programmer's Manual"
 .SH 名前
-.\"O tempnam \- create a name for a temporary file
 tempnam \- テンポラリファイルの名前を作成する
-.\"O .SH SYNOPSIS
 .SH 書式
 .nf
-.B #include <stdio.h>
+\fB#include <stdio.h>\fP
 .sp
-.BI "char *tempnam(const char *" dir ", const char *" pfx );
+\fBchar *tempnam(const char *\fP\fIdir\fP\fB, const char *\fP\fIpfx\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)  参照):
 .in
 .sp
-.BR tempnam ():
-_BSD_SOURCE || _SVID_SOURCE
-.\"O .SH DESCRIPTION
+\fBtempnam\fP(): _BSD_SOURCE || _SVID_SOURCE
 .SH 説明
-.\"O The
-.\"O .BR tempnam ()
-.\"O function returns a pointer to a string that is a valid filename,
-.\"O and such that a file with this name did not exist when
-.\"O .BR tempnam ()
-.\"O checked.
-.\"O The filename suffix of the pathname generated will start with
-.\"O .I pfx
-.\"O in case
-.\"O .I pfx
-.\"O is a non-NULL string of at most five bytes.
-.\"O The directory prefix part of the pathname generated is required to
-.\"O be "appropriate" (often that at least implies writable).
-.BR tempnam ()
-関数はファイル名として正しい文字列へのポインターを返す。
-このファイル名を持つファイルは、
-.BR tempnam ()
-がチェックした時点においては存在しない (しなかった)。
-.I pfx
-が NULL でない 5 バイト以内の文字列であれば、
-生成されるパス名のうちのファイル名の部分は
-.I pfx
-から始まるものになる。
-生成されるディレクトリの部分は、「適切」でなければならない
-(大抵の場合、「適切」であるためにはまず少なくとも
-書き込み可能でなければならない)。
+\fBtempnam\fP()  関数はファイル名として正しい文字列へのポインターを返す。 このファイル名を持つファイルは、 \fBtempnam\fP()
+がチェックした時点においては存在しない (しなかった)。 \fIpfx\fP が NULL でない 5 バイト以内の文字列であれば、
+生成されるパス名のうちのファイル名の部分は \fIpfx\fP から始まるものになる。 生成されるディレクトリの部分は、「適切」でなければならない
+(大抵の場合、「適切」であるためにはまず少なくとも 書き込み可能でなければならない)。
 
-.\"O Attempts to find an appropriate directory go through the following
-.\"O steps:
 適切なディレクトリの探索は、以下の手順にしたがって行われる。
-.TP 3
+.TP  3
 a)
-.\"O In case the environment variable
-.\"O .B TMPDIR
-.\"O exists and
-.\"O contains the name of an appropriate directory, that is used.
-環境変数
-.B TMPDIR
-が設定されていて、
-その内容が適切なディレクトリの名前なら、それを用いる。
-.TP
+環境変数 \fBTMPDIR\fP が設定されていて、 その内容が適切なディレクトリの名前なら、それを用いる。
+.TP 
 b)
-.\"O Otherwise, if the
-.\"O .I dir
-.\"O argument is non-NULL and appropriate, it is used.
-それ以外の場合、
-.I dir
-引き数が NULL でない文字列でかつ適切なら、それを用いる。
-.TP
+それ以外の場合、 \fIdir\fP 引き数が NULL でない文字列でかつ適切なら、それを用いる。
+.TP 
 c)
-.\"O Otherwise,
-.\"O .I P_tmpdir
-.\"O (as defined in
-.\"O .IR <stdio.h> )
-.\"O is used when appropriate.
-それ以外の場合、
-.RI ( <stdio.h>
-で定義されている)
-.I P_tmpdir
-が適切なら、それを用いる。
-.TP
+それ以外の場合、 (\fI<stdio.h>\fP で定義されている)  \fIP_tmpdir\fP が適切なら、それを用いる。
+.TP 
 d)
-.\"O Finally an implementation-defined directory may be used.
 最後に実装で定義されたディレクトリが用いられることになる。
 .PP
-.\"O The string returned by
-.\"O .BR tempnam ()
-.\"O is allocated using
-.\"O .BR malloc (3)
-.\"O and hence should be freed by
-.\"O .BR free (3).
-.BR tempnam ()
-が返す文字列は
-.BR malloc (3)
-を使って確保される。そのため、
-.BR free (3)
-で解放すべきである。
-.\"O .SH "RETURN VALUE"
+\fBtempnam\fP()  が返す文字列は \fBmalloc\fP(3)  を使って確保される。そのため、 \fBfree\fP(3)  で解放すべきである。
 .SH 返り値
-.\"O The
-.\"O .BR tempnam ()
-.\"O function returns a pointer to a unique temporary
-.\"O filename, or NULL if a unique name cannot be generated.
-.BR tempnam ()
-関数は他と重ならないテンポラリファイル名へのポインタを返す。
-他と重ならない名前が生成できなければ NULL を返す。
-.\"O .SH ERRORS
+\fBtempnam\fP()  関数は他と重ならないテンポラリファイル名へのポインタを返す。 他と重ならない名前が生成できなければ NULL を返す。
 .SH エラー
-.TP
-.B ENOMEM
-.\"O Allocation of storage failed.
+.TP 
+\fBENOMEM\fP
 保存領域の割り当てに失敗した。
-.\"O .SH "CONFORMING TO"
 .SH 準拠
-SVr4, 4.3BSD, POSIX.1-2001.
-.\"O POSIX.1-2008 marks
-.\"O .BR tempnam ()
-.\"O as obsolete.
-POSIX.1-2008 は
-.BR tempnam ()
-を廃止予定としている。
-.\"O .SH NOTES
+SVr4, 4.3BSD, POSIX.1\-2001.  POSIX.1\-2008 は \fBtempnam\fP()  を廃止予定としている。
 .SH 注意
-.\"O Although
-.\"O .BR tempnam ()
-.\"O generates names that are difficult to guess,
-.\"O it is nevertheless possible that between the time that
-.\"O .BR tempnam ()
-.\"O returns a pathname, and the time that the program opens it,
-.\"O another program might create that pathname using
-.\"O .BR open (2),
-.\"O or create it as a symbolic link.
-.\"O This can lead to security holes.
-.\"O To avoid such possibilities, use the
-.\"O .BR open (2)
-.\"O .B O_EXCL
-.\"O flag to open the pathname.
-.\"O Or better yet, use
-.\"O .BR mkstemp (3)
-.\"O or
-.\"O .BR tmpfile (3).
-.BR tempnam ()
-は推測が難しい名前を生成するが、それにもかかわらず、
-.BR tempnam ()
-がパス名を返してから、プログラムがそのファイルをオープンする
-までの間に、別のプログラムが同じパス名で、ファイルを
-.BR open (2)
-で作成したり、シンボリックリンクを作成したりする可能性がある。
-これはセキュリティホールにつながる可能性がある。
-そのような可能性を回避するためには、
-.BR open (2)
-の
-.B O_EXCL
-フラグを使ってパス名をオープンすればよい。
-もっといいのは、
-.BR mkstemp (3)
-や
-.BR tmpfile (3)
-を使うことである。
+\fBtempnam\fP()  は推測が難しい名前を生成するが、それにもかかわらず、 \fBtempnam\fP()
+がパス名を返してから、プログラムがそのファイルをオープンする までの間に、別のプログラムが同じパス名で、ファイルを \fBopen\fP(2)
+で作成したり、シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能性がある。 そのような可能性を回避するためには、
+\fBopen\fP(2)  の \fBO_EXCL\fP フラグを使ってパス名をオープンすればよい。 もっといいのは、 \fBmkstemp\fP(3)  や
+\fBtmpfile\fP(3)  を使うことである。
 
-.\"O SUSv2 does not mention the use of
-.\"O .BR TMPDIR ;
-.\"O glibc will use it only
-.\"O when the program is not set-user-ID.
-.\"O On SVr4, the directory used under \fBd)\fP is
-.\"O .I /tmp
-.\"O (and this is what glibc does).
-SUSv2 では
-.B TMPDIR
-に付いて言及されていない。
-glibc は、プログラムが set-user-ID されていない場合に限ってこれを用いる。
-SVr4 では \fBd)\fP で使用されるディレクトリを
-.I /tmp
-と定めている (glibc もこの通りである)。
+SUSv2 では \fBTMPDIR\fP に付いて言及されていない。 glibc は、プログラムが set\-user\-ID
+されていない場合に限ってこれを用いる。 SVr4 では \fBd)\fP で使用されるディレクトリを \fI/tmp\fP と定めている (glibc
+もこの通りである)。
 .LP
-.\"O Because it dynamically allocates memory used to return the pathname,
-.\"O .BR tempnam ()
-.\"O is reentrant, and thus thread safe, unlike
-.\"O .BR tmpnam (3).
-パス名を返すのに使用するメモリを動的に確保するので、
-.BR tmpnam (3)
-と違い、
-.BR tempnam ()
+パス名を返すのに使用するメモリを動的に確保するので、 \fBtmpnam\fP(3)  と違い、 \fBtempnam\fP()
 はリエントラントであり、スレッドセーフである。
 .LP
-.\"O The
-.\"O .BR tempnam ()
-.\"O function generates a different string each time it is called,
-.\"O up to
-.\"O .B TMP_MAX
-.\"O (defined in
-.\"O .IR <stdio.h> )
-.\"O times.
-.\"O If it is called more than
-.\"O .B TMP_MAX
-.\"O times,
-.\"O the behavior is implementation defined.
-.BR tempnam ()
-関数は最大
-.B TMP_MAX
-回まで、呼び出される度に異なる文字列を作成する
-.RB ( TMP_MAX
-は
-.I <stdio.h>
-で定義されている)。
-もし
-.B TMP_MAX
-回以上呼び出された場合、動作は実装依存である。
+\fBtempnam\fP()  関数は最大 \fBTMP_MAX\fP 回まで、呼び出される度に異なる文字列を作成する (\fBTMP_MAX\fP は
+\fI<stdio.h>\fP で定義されている)。 もし \fBTMP_MAX\fP 回以上呼び出された場合、動作は実装依存である。
 .LP
-.\"O .BR tempnam ()
-.\"O uses at most the first five bytes from
-.\"O .IR pfx .
-.BR tempnam ()
-は最大で
-.I pfx
-の先頭 5 バイトを使用する。
+\fBtempnam\fP()  は最大で \fIpfx\fP の先頭 5 バイトを使用する。
 
-.\"O The glibc implementation of
-.\"O .BR tempnam ()
-.\"O will fail with the error
-.\"O .B EEXIST
-.\"O upon failure to find a unique name.
-他と重ならない名前が見つけられなかった場合、glibc の
-.BR tempnam ()
-の実装はエラー
-.B EEXIST
-で失敗する。
-.\"O .SH BUGS
+他と重ならない名前が見つけられなかった場合、glibc の \fBtempnam\fP()  の実装はエラー \fBEEXIST\fP で失敗する。
 .SH バグ
-.\"O The precise meaning of "appropriate" is undefined;
-.\"O it is unspecified how accessibility of a directory is determined.
-「適切」という言葉の正確な意味は定義されていない。
-ディレクトリに対してどの程度のアクセス権限が必要なのかは指定されていない。
+「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程度のアクセス権限が必要なのかは指定されていない。
 
-.\"O Never use this function.
-.\"O Use
-.\"O .BR mkstemp (3)
-.\"O or
-.\"O .BR tmpfile (3)
-.\"O instead.
-決してこの関数を使ってはならない。代わりに
-.BR mkstemp (3)
-か
-.BR tmpfile (3)
-を使うこと。
-.\"O .SH "SEE ALSO"
+決してこの関数を使ってはならない。代わりに \fBmkstemp\fP(3)  か \fBtmpfile\fP(3)  を使うこと。
 .SH 関連項目
-.BR mkstemp (3),
-.BR mktemp (3),
-.BR tmpfile (3),
-.BR tmpnam (3)
+\fBmkstemp\fP(3), \fBmktemp\fP(3), \fBtmpfile\fP(3), \fBtmpnam\fP(3)