OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / release / man2 / close.2
diff --git a/release/man2/close.2 b/release/man2/close.2
deleted file mode 100644 (file)
index c390bde..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
-.\"             and Copyright (C) 1993 Michael Haardt, Ian Jackson.
-.\"
-.\" %%%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
-.\"
-.\" Modified Wed Jul 21 22:40:25 1993 by Rik Faith <faith@cs.unc.edu>
-.\" Modified Sat Feb 18 15:27:48 1995 by Michael Haardt
-.\" Modified Sun Apr 14 11:40:50 1996 by Andries Brouwer <aeb@cwi.nl>:
-.\"   corrected description of effect on locks (thanks to
-.\"   Tigran Aivazian <tigran@sco.com>).
-.\" Modified Fri Jan 31 16:21:46 1997 by Eric S. Raymond <esr@thyrsus.com>
-.\" Modified 2000-07-22 by Nicolás Lichtmaier <nick@debian.org>
-.\"   added note about close(2) not guaranteeing that data is safe on close.
-.\"
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
-.\"         all rights reserved.
-.\" Translated Sat Jun  1 22:22:05 JST 1997
-.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Modified Mon Sep 23 20:42:13 JST 2000
-.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated & Modified Sat Apr  7 03:24:03 JST 2001
-.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
-.\" Updated & Modified Mon Jan 14 12:41:36 JST 2002 by Yuichi SATO
-.\" Updated & Modified Wed Dec 29 07:01:14 JST 2004
-.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
-.\" Updated 2007-10-12, Akihiro MOTOKI, LDP v2.66
-.\" Updated 2008-02-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
-.\"
-.TH CLOSE 2 2013\-12\-30 Linux "Linux Programmer's Manual"
-.SH 名前
-close \- ファイルディスクリプターをクローズする
-.SH 書式
-.nf
-\fB#include <unistd.h>\fP
-.sp
-\fBint close(int \fP\fIfd\fP\fB);\fP
-.fi
-.SH 説明
-\fBclose\fP()  は、ファイルディスクリプターをクローズする。 そのディスクリプターは、どのファイルも参照していない状態になり、
-再利用が可能になる。 そのファイルディスクリプターに関連づけられたファイルに かけられたレコードロック (\fBfcntl\fP(2)  参照)
-のうち、そのプロセスが保有しているものは、 (そのファイルディスクリプターがロック取得に利用されたか どうかによらず) すべて削除される。
-.PP
-\fIfd\fP が、対応するオープンファイル記述 (open file description)  (\fBopen\fP(2)  参照)
-を参照する最後のファイルディスクリプターだった場合、 オープンファイル記述に関連するリソースが解放される。 そのディスクリプターが、 \fBunlink\fP
-を使用して削除 (remove) されたファイルに対する最後の参照だった場合には、 そのファイルは削除 (delete) される。
-.SH 返り値
-\fBclose\fP()  は成功した場合は 0 を返す。 エラーが発生した場合は \-1 を返して、 \fIerrno\fP を適切に設定する。
-.SH エラー
-.TP 
-\fBEBADF\fP
-\fIfd\fP が有効なオープンされたディスクリプターでない。
-.TP 
-\fBEINTR\fP
-\fBclose\fP()  コールがシグナルにより中断 (interrupt) された。 \fBsignal\fP(7)  参照。
-.TP 
-\fBEIO\fP
-I/O エラーが発生した。
-.SH 準拠
-.\" SVr4 documents an additional ENOLINK error condition.
-SVr4, 4.3BSD, POSIX.1\-2001.
-.SH 注意
-\fBclose\fP()  の返り値のチェックはよく省略されるが、 これは深刻なプログラミングエラーである。 前の \fBwrite\fP(2)
-処理に関するエラーが最後の \fBclose\fP()  のときになって初めて通知される場合がありうる。 ファイルクローズの際に返り値をチェックしないと、
-気付かないうちにデータを失ってしまうかもしれない。 これは特に NFS
-やディスククォータを使用した場合に見られる。返り値は状態確認用にのみ利用すべき点に注意すること。特に、\fBEINTR\fP 後に \fBclose\fP()
-を再度行うべきではない。なぜなら、これにより、別のスレッドが再利用したディスクリプターをクローズしてしまう可能性があるからだ。
-.PP
-クローズに成功しても、データがディスクに保存されたかどうかは 保証されない (カーネルが書きこみを遅延させることがあるためである)。
-ストリームがクローズされるときにバッファーをフラッシュするかどうかは、 ファイルシステムによって異なる。
-データが物理的に保存されることを保証する必要がある場合には、 \fBfsync\fP(2)  を使用すること (\fBfsync\fP(3)
-を行った時点で、データの保存はディスクのハードウェアに依存する 問題となる)。
-.PP
-.\" Date: Tue, 4 Sep 2007 13:57:35 +0200
-.\" From: Fredrik Noring <noring@nocrew.org>
-.\" One such race involves signals and ERESTARTSYS. If a file descriptor
-.\" in use by a system call is closed and then reused by e.g. an
-.\" independent open() in some unrelated thread, before the original system
-.\" call has restarted after ERESTARTSYS, the original system call will
-.\" later restart with the reused file descriptor. This is most likely a
-.\" serious programming error.
-同じプロセス内の他のスレッドのシステムコールが使用している可能性がある間に、 ファイルディスクリプターをクローズするのは、おそらく賢明ではないだろう。
-ファイルディスクリプターは再利用されるかもしれないので、 あいまいな競合条件となることがあり、意図しない副作用の原因となりうる。
-.SH 関連項目
-\fBfcntl\fP(2), \fBfsync\fP(2), \fBopen\fP(2), \fBshutdown\fP(2), \fBunlink\fP(2),
-\fBfclose\fP(3)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。