.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
.\"
-.TH READ 2 2013\-02\-12 Linux "Linux Programmer's Manual"
+.TH READ 2 2014\-05\-04 Linux "Linux Programmer's Manual"
.SH 名前
read \- ファイルディスクリプタから読み込む
.SH 書式
(最終ファイルアクセス時刻) の更新をサーバーに送らず、クライアント側でキャッシュを読むことに満足して いれば、サーバー側での read
は発生しないので st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性のキャッシングを無効にすることで、
これを得ることができる。しかしほとんどの状況ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。
+.SH バグ
+According to POSIX.1\-2008/SUSv4 Section XSI 2.9.7 ("Thread Interactions with
+Regular File Operations"):
+
+.RS 4
+All of the following functions shall be atomic with respect to each other in
+the effects specified in POSIX.1\-2008 when they operate on regular files or
+symbolic links: ...
+.RE
+
+.\" http://thread.gmane.org/gmane.linux.kernel/1649458
+.\" From: Michael Kerrisk (man-pages <mtk.manpages <at> gmail.com>
+.\" Subject: Update of file offset on write() etc. is non-atomic with I/O
+.\" Date: 2014-02-17 15:41:37 GMT
+.\" Newsgroups: gmane.linux.kernel, gmane.linux.file-systems
+.\" commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4
+.\" Author: Linus Torvalds <torvalds@linux-foundation.org>
+.\" Date: Mon Mar 3 09:36:58 2014 -0800
+.\"
+.\" vfs: atomic f_pos accesses as per POSIX
+Among the APIs subsequently listed are \fBread\fP() and \fBreadv\fP(2). And
+among the effects that should be atomic across threads (and processes) are
+updates of the file offset. However, on Linux before version 3.14, this was
+not the case: if two processes that share an open file description (see
+\fBopen\fP(2)) perform a \fBread\fP() (or \fBreadv\fP(2)) at the same time, then
+the I/O operations were not atomic with respect updating the file offset,
+with the result that the reads in the two processes might (incorrectly)
+overlap in the blocks of data that they obtained. This problem was fixed in
+Linux 3.14.
.SH 関連項目
\fBclose\fP(2), \fBfcntl\fP(2), \fBioctl\fP(2), \fBlseek\fP(2), \fBopen\fP(2), \fBpread\fP(2),
\fBreaddir\fP(2), \fBreadlink\fP(2), \fBreadv\fP(2), \fBselect\fP(2), \fBwrite\fP(2),
\fBfread\fP(3)
.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。