OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man2 / sync.2
index bba5ebf..221d47e 100644 (file)
@@ -1,7 +1,7 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
+.\" and Copyright (c) 2011 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%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.
@@ -21,6 +21,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" Modified by Michael Haardt <michael@moria.de>
 .\" Modified Sat Jul 24 12:02:47 1993 by Rik Faith <faith@cs.unc.edu>
 .\"   Added the fact that since 1.3.20 sync actually waits.
 .\" Modified Tue Oct 22 22:27:07 1996 by Eric S. Raymond <esr@thyrsus.com>
 .\" Modified 2001-10-10 by aeb, following Michael Kerrisk.
+.\" 2011-09-07, mtk, Added syncfs() documentation,
 .\"
-.\" Japanese Version Copyright (c) 1997 Daisuke Sato
-.\"         all rights reserved.
-.\" Translated Sat Apr 19 15:22:53 JST 1997
-.\"         by Daisuke Sato
-.\" Modified Sun Mar 21 17:23:38 JST 1999
-.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated Tue Oct 16 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
-.\" Updated Mon Sep  8 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
+.\"*******************************************************************
 .\"
-.\"WORD:       buffer cache            ¥Ð¥Ã¥Õ¥¡¡¦¥­¥ã¥Ã¥·¥å
-.\"WORD:       buffers                 ¥Ð¥Ã¥Õ¥¡
-.\"WORD:       data integrity          ¥Ç¡¼¥¿¤Î´°Á´À­
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH SYNC 2 2010-09-20 "Linux" "Linux Programmer's Manual"
-.SH Ì¾Á°
-sync \- ¥Ð¥Ã¥Õ¥¡¥­¥ã¥Ã¥·¥å¤ò¥Ç¥£¥¹¥¯¤Ë½ñ¤­¹þ¤à
-.SH ½ñ¼°
-.B #include <unistd.h>
+.\"*******************************************************************
+.TH SYNC 2 2012\-05\-04 Linux "Linux Programmer's Manual"
+.SH 名前
+sync, syncfs \- バッファキャッシュをディスクに書き込む
+.SH 書式
+\fB#include <unistd.h>\fP
+.sp
+\fBvoid sync(void);\fP
 .sp
-.B void sync(void);
+\fBint syncfs(int \fP\fIfd\fP\fB);\fP
 .sp
 .in -4n
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR sync ():
+\fBsync\fP():
+.ad l
+.RS 4
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+.RE
+.ad
+.sp
+\fBsyncfs\fP():
 .ad l
 .RS 4
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
-_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_GNU_SOURCE
 .RE
 .ad
-.SH ÀâÌÀ
-.BR sync ()
-¤Ï¤Þ¤º inode ¤ò¥Ð¥Ã¥Õ¥¡¤Ø½ñ¤­¹þ¤ß¡¢
-¤½¤ì¤«¤é¥Ð¥Ã¥Õ¥¡(buffer)¤ò¥Ç¥£¥¹¥¯¤Ø½ñ¤­¹þ¤à¡£
-.SH ¥¨¥é¡¼
-¤³¤Î´Ø¿ô¤Ï¾ï¤ËÀ®¸ù¤¹¤ë¡£
-.SH ½àµò
-SVr4, 4.3BSD, POSIX.1-2001.
-.SH Ãí°Õ
-¤µ¤Þ¤¶¤Þ¤Êɸ½àµ¬³Ê¤Ç¤Îµ¬Äê¤Ë¤·¤¿¤¬¤Ã¤Æ¡¢
-glibc 2.2.2 ¤«¤é Linux ¤Ç¤Î¥×¥í¥È¥¿¥¤¥×¤Ï¾å½Ò¤Î¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
-libc4, libc5 ¤È¡¢2.2.1 ¤Þ¤Ç¤Î glibc ¤Ç¤Ï "int sync(void)" ¤Ç¡¢
-.BR sync ()
-¤Ï¾ï¤Ë 0 ¤òÊÖ¤·¤Æ¤¤¤¿¡£
-.SH ¥Ð¥°
-ɸ½àµ¬³Ê (Î㤨¤Ð POSIX.1-2001) ¤Ë¤è¤ë¤È¡¢
-.BR sync ()
-¤Ï½ñ¤­¹þ¤à¤³¤È¤òͽÄê¤Ë
-ÁȤ߹þ¤à¤Î¤ß¤Ç¼ÂºÝ¤Ë½ñ¤­¹þ¤ß¤¬½ªÎ»¤¹¤ëÁ°¤ËÌá¤Ã¤Æ¤â¤è¤¤¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
-°ìÊý¤Ç Linux ¤Ï¥Ð¡¼¥¸¥ç¥ó 1.3.20 ¤«¤é¤Ï½ñ¤­¹þ¤ß¤¬½ªÎ»¤¹¤ë¤Þ¤ÇÂԤġ£
-(ºÇ¶á¤Î¥Ç¥£¥¹¥¯¤ÏÂ礭¤Ê¥­¥ã¥Ã¥·¥å¤ò»ý¤Ã¤Æ¤¤¤ë¤¿¤á¡¢
- ¤³¤ì¤Ï¥Ç¡¼¥¿¤Î´°Á´À­ (data integrity) ¤Þ¤Ç¤ÏÊݾڤ·¤Æ¤¤¤Ê¤¤¡£)
-.SH ´ØÏ¢¹àÌÜ
-.BR bdflush (2),
-.BR fdatasync (2),
-.BR fsync (2),
-.BR sync (8),
-.BR update (8)
+.SH 説明
+\fBsync\fP() を呼び出すと、バッファされたファイルのメタデータとデータ本体に
+対して行われた全ての変更が、対応するファイルシステムに書き込まれる。
+
+\fBsyncfs\fP() は \fBsync\fP() と同様だが、オープンされたファイルディスクリプタ \fIfd\fP
+が参照するファイルを含むファイルシステムだけを同期する点が異なる。
+.SH 返り値
+\fBsyncfs\fP() は成功すると 0 を返す。エラーが発生した場合は \-1 を返し、
+\fIerrno\fP にエラーを示す値を設定する。
+.SH エラー
+\fBsync\fP() は常に成功する。
+
+\fBsyncfs\fP() は少なくとも以下の理由で失敗する可能性がある:
+.TP 
+\fBEBADF\fP
+\fIfd\fP が有効なファイルディスクリプタでない。。
+.SH バージョン
+\fBsyncfs\fP() は Linux 2.6.39 で初めて登場した。
+ライブラリによるサポートは glibc バージョン 2.14 で追加された。
+.SH 準拠
+\fBsync\fP(): SVr4, 4.3BSD, POSIX.1\-2001.
+
+\fBsyncfs\fP() is Linux 固有である。
+.SH 注意
+Linux での \fBsync\fP() のプロトタイプは、さまざまな標準規格での規定に準拠し、
+glibc 2.2.2 から上述のようになった。
+libc4, libc5 と、2.2.1 までの glibc ではプロトタイプは "int sync(void)" で、
+\fBsync\fP()  は常に 0 を返していた。
+.SH バグ
+標準規格 (例えば POSIX.1\-2001) によると、
+\fBsync\fP()
+は書き込むことを予定に
+組み込むのみで実際に書き込みが終了する前に戻ってもよいことになっている。
+一方で Linux はバージョン 1.3.20 からは書き込みが終了するまで待つ。
+(最近のディスクは大きなキャッシュを持っているため、
+ これはデータの完全性 (data integrity) までは保証していない。)
+.SH 関連項目
+\fBbdflush\fP(2), \fBfdatasync\fP(2), \fBfsync\fP(2), \fBsync\fP(8), \fBupdate\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。