-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
-.\" 1993 Michael Haardt, Ian Jackson.
+.\" and Copyright (C) 1993 Michael Haardt, Ian Jackson.
.\" and Copyright (C) 2007 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.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" Modified Sat Jul 24 13:35:59 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Sun Nov 28 17:19:01 1993 by Rik Faith <faith@cs.unc.edu>
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH WRITE 2 2010\-08\-29 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 書式
\fBEDESTADDRREQ\fP
\fIfd\fP が、 \fBconnect\fP(2) を使って通信相手のアドレスが設定されていないデータグラムソケットを 参照している。
.TP
+\fBEDQUOT\fP
+\fIfd\fP が参照するファイルを含むファイルシステムのディスクブロックのユーザクォータの上限に達している。
+.TP
\fBEFAULT\fP
\fIbuf\fP がアクセス可能なアドレス空間の外にある。
.TP
\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.40 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.76 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。