OSDN Git Service

Update release for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man2 / write.2
index 80f7e5d..19026f2 100644 (file)
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH WRITE 2 2013\-01\-27 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated Tue Mar  4 00:18:20 JST 1997
+.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated & Modified Wed Jun 13 20:57:55 JST 2001
+.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated Mon Jun 25 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated Fri Dec 21 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2002-09-24 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2005-10-14 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
+.\" Updated 2007-09-01, Akihiro MOTOKI, LDP v2.64
+.\" Updated 2008-04-13, Akihiro MOTOKI, LDP v3.20
+.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH WRITE 2 2014\-05\-04 Linux "Linux Programmer's Manual"
 .SH 名前
 write \- ファイルディスクリプタ (file descriptor) に書き込む
 .SH 書式
@@ -131,10 +148,38 @@ SVr4 では write が割り込まれると、データが書き込まれる直
 
 \fBwrite\fP()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた場合、 \fBwrite\fP()  はエラー \fBEINTR\fP
 で失敗する。 1バイトでも書き込んだ後で割り込まれた場合には、 \fBwrite\fP()  は成功し、書き込んだバイト数を返す。
+.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 \fBwrite\fP()  and \fBwritev\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 \fBwrite\fP()  (or \fBwritev\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 blocks of data output by the two processes might
+(incorrectly) overlap.  This problem was fixed in Linux 3.14.
 .SH 関連項目
 \fBclose\fP(2), \fBfcntl\fP(2), \fBfsync\fP(2), \fBioctl\fP(2), \fBlseek\fP(2), \fBopen\fP(2),
 \fBpwrite\fP(2), \fBread\fP(2), \fBselect\fP(2), \fBwritev\fP(2), \fBfwrite\fP(3)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。