OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / tmpfile.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 17:46:57 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2001-11-17, aeb
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH TMPFILE 3 2008\-07\-14 "" "Linux Programmer's Manual"
35 .SH 名前
36 tmpfile \- テンポラリファイルを作成する
37 .SH 書式
38 .nf
39 \fB#include <stdio.h>\fP
40 .sp
41 \fBFILE *tmpfile(void);\fP
42 .fi
43 .SH 説明
44 \fBtmpfile\fP()  関数はユニークなテンポラリファイルを バイナリリードライトモード (w+b) でオープンする。
45 このファイルはクローズ時またはプログラムの終了時に自動的に削除される。
46 .SH 返り値
47 \fBtmpfile\fP()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかったかオープンできなかった場合は NULL を返す。
48 後者の場合、エラーを表す \fIerrno\fP を設定する。
49 .SH エラー
50 .TP 
51 \fBEACCES\fP
52 ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。
53 .TP 
54 \fBEEXIST\fP
55 ユニークなファイル名が作成できなかった。
56 .TP 
57 \fBEINTR\fP
58 呼び出しがシグナルによって中断された。
59 .TP 
60 \fBEMFILE\fP
61 1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。
62 .TP 
63 \fBENFILE\fP
64 システム全体でオープン可能なファイル数を超過した。
65 .TP 
66 \fBENOSPC\fP
67 ディレクトリに新しいファイルを追加するための空き領域がない。
68 .TP 
69 \fBEROFS\fP
70 読みだし専用ファイルシステムである。
71 .SH 準拠
72 SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1\-2001.
73 .SH 注意
74 POSIX.1\-2001 では、 ストリームをオープンできなかった場合、 \fIstdout\fP にエラーメッセージが書き出される、と規定されている。
75 .LP
76 規格では \fBtmpfile\fP()  が使うディレクトリは指定されていない。 glibc では \fI<stdio.h>\fP
77 で定義されている \fIP_tmpdir\fP をパスの先頭に使おうとする。 これが失敗した場合は、ディレクトリ \fI/tmp\fP を使う。
78 .SH 関連項目
79 \fBexit\fP(3), \fBmkstemp\fP(3), \fBmktemp\fP(3), \fBtempnam\fP(3), \fBtmpnam\fP(3)