OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / man3 / fclose.3
1 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to Berkeley by
5 .\" Chris Torek and the American National Standards Committee X3,
6 .\" on Information Processing Systems.
7 .\"
8 .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\"    notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in the
16 .\"    documentation and/or other materials provided with the distribution.
17 .\" 3. All advertising materials mentioning features or use of this software
18 .\"    must display the following acknowledgement:
19 .\"     This product includes software developed by the University of
20 .\"     California, Berkeley and its contributors.
21 .\" 4. Neither the name of the University nor the names of its contributors
22 .\"    may be used to endorse or promote products derived from this software
23 .\"    without specific prior written permission.
24 .\"
25 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .\" SUCH DAMAGE.
36 .\" %%%LICENSE_END
37 .\"
38 .\"     @(#)fclose.3    6.7 (Berkeley) 6/29/91
39 .\"
40 .\" Converted for Linux, Mon Nov 29 15:19:14 1993, faith@cs.unc.edu
41 .\"
42 .\" Modified 2000-07-22 by Nicolás Lichtmaier <nick@debian.org>
43 .\"
44 .\"*******************************************************************
45 .\"
46 .\" This file was generated with po4a. Translate the source file.
47 .\"
48 .\"*******************************************************************
49 .TH FCLOSE 3 2009\-02\-23 GNU "Linux Programmer's Manual"
50 .SH 名前
51 fclose \- ストリームを閉じる
52 .SH 書式
53 \fB#include <stdio.h>\fP
54 .sp
55 \fBint fclose(FILE *\fP\fIfp\fP\fB);\fP
56 .SH 説明
57 \fBfclose\fP() 関数は、 \fIfp\fP が指すストリームを (バッファリングされて
58 いた全ての出力データを \fBfflush\fP(3) を用いて書き込んで) フラッシュし、
59 対応するファイルディスクリプタをクローズする。
60 .SH 返り値
61 関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には \fBEOF\fP が返され、 \fIerrno\fP がエラーを示すために設定される。
62 どちらの場合も、そのストリームに対する (\fBfclose\fP()  へのさらなる呼び出しを含む) それ以上のアクセスは 未定義の動作を生じさせる。
63 .SH エラー
64 .TP 
65 \fBEBADF\fP
66 .\"  This error cannot occur unless you are mixing ANSI C stdio operations and
67 .\"  low-level file operations on the same stream. If you do get this error,
68 .\"  you must have closed the stream's low-level file descriptor using
69 .\"  something like close(fileno(fp)).
70 \fIfp\fP の基となるファイルディスクリプタが不正である。
71 .PP
72 \fBfclose\fP()  関数はこれ以外にも \fBclose\fP(2), \fBwrite\fP(2), \fBfflush\fP(3)
73 のルーチンで失敗することがある。その場合は \fIerrno\fP が、失敗したルーチンで設定された値に設定される。
74 .SH 準拠
75 C89, C99.
76 .SH 注意
77 Note that \fBfclose\fP()  only flushes the user\-space buffers provided by the C
78 library.  To ensure that the data is physically stored on disk the kernel
79 buffers must be flushed too, for example, with \fBsync\fP(2)  or \fBfsync\fP(2).
80 .SH 関連項目
81 \fBclose\fP(2), \fBfcloseall\fP(3), \fBfflush\fP(3), \fBfopen\fP(3), \fBsetbuf\fP(3)
82 .SH この文書について
83 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
84 である。プロジェクトの説明とバグ報告に関する情報は
85 http://www.kernel.org/doc/man\-pages/ に書かれている。