.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%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. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 17:46:57 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 2001-11-17, aeb .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 Tenkou N. Hattori .\" all rights reserved. .\" Translated Sat Jan 18 16:51:59 JST 1997 .\" by Tenkou N. Hattori .\" Updated & Modified Sun Dec 9 15:25:20 JST 2001 .\" by Yuichi SATO .\" .TH TMPFILE 3 2008\-07\-14 "" "Linux Programmer's Manual" .SH 名前 tmpfile \- テンポラリファイルを作成する .SH 書式 .nf \fB#include \fP .sp \fBFILE *tmpfile(void);\fP .fi .SH 説明 \fBtmpfile\fP() 関数はユニークなテンポラリファイルを バイナリリードライトモード (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に自動的に削除される。 .SH 返り値 \fBtmpfile\fP() 関数はファイルポインターを返すか、 ユニークなファイルが作れなかったかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す \fIerrno\fP を設定する。 .SH エラー .TP \fBEACCES\fP ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。 .TP \fBEEXIST\fP ユニークなファイル名が作成できなかった。 .TP \fBEINTR\fP 呼び出しがシグナルによって中断された。 .TP \fBEMFILE\fP 1 つのプロセスで使用可能なファイルディスクリプター数を超過した。 .TP \fBENFILE\fP システム全体でオープン可能なファイル数を超過した。 .TP \fBENOSPC\fP ディレクトリに新しいファイルを追加するための空き領域がない。 .TP \fBEROFS\fP 読みだし専用ファイルシステムである。 .SH 準拠 SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1\-2001. .SH 注意 POSIX.1\-2001 では、 ストリームをオープンできなかった場合、 \fIstdout\fP にエラーメッセージが書き出される、と規定されている。 .LP 規格では \fBtmpfile\fP() が使うディレクトリは指定されていない。 glibc では \fI\fP で定義されている \fIP_tmpdir\fP をパスの先頭に使おうとする。 これが失敗した場合は、ディレクトリ \fI/tmp\fP を使う。 .SH 関連項目 \fBexit\fP(3), \fBmkstemp\fP(3), \fBmktemp\fP(3), \fBtempnam\fP(3), \fBtmpnam\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。