diff options
Diffstat (limited to 'man2/write.2')
-rw-r--r-- | man2/write.2 | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/man2/write.2 b/man2/write.2 index a24cbdc31..0b7993b45 100644 --- a/man2/write.2 +++ b/man2/write.2 @@ -43,22 +43,22 @@ if, for example, there is insufficient space on the underlying physical medium, or the .B RLIMIT_FSIZE resource limit is encountered (see -.BR setrlimit (2)), +.MR setrlimit 2 ), or the call was interrupted by a signal handler after having written less than .I count bytes. (See also -.BR pipe (7).) +.MR pipe 7 .) .P For a seekable file (i.e., one to which -.BR lseek (2) +.MR lseek 2 may be applied, for example, a regular file) writing takes place at the file offset, and the file offset is incremented by the number of bytes actually written. If the file was -.BR open (2)ed +.MR open 2 ed with .BR O_APPEND , the file offset is first set to the end of the file before writing. @@ -66,7 +66,7 @@ The adjustment of the file offset and the write operation are performed as an atomic step. .P POSIX requires that a -.BR read (2) +.MR read 2 that can be proved to occur after a .BR write () has returned will return the new data. @@ -122,7 +122,7 @@ refers to a file other than a socket and has been marked nonblocking .RB ( O_NONBLOCK ), and the write would block. See -.BR open (2) +.MR open 2 for further details on the .B O_NONBLOCK flag. @@ -145,7 +145,7 @@ is not a valid file descriptor or is not open for writing. .B EDESTADDRREQ .I fd refers to a datagram socket for which a peer address has not been set using -.BR connect (2). +.MR connect 2 . .TP .B EDQUOT The user's quota of disk blocks on the filesystem containing the file @@ -164,7 +164,7 @@ or to write at a position past the maximum allowed offset. .TP .B EINTR The call was interrupted by a signal before any data was written; see -.BR signal (7). +.MR signal 7 . .TP .B EINVAL .I fd @@ -191,7 +191,7 @@ be reported by subsequent. requests, and .I will be reported by a subsequent -.BR fsync (2) +.MR fsync 2 (whether or not they were also reported by .BR write ()). .\" commit 088737f44bbf6378745f5b57b035e57ee3dc4750 @@ -202,7 +202,7 @@ on the file descriptor and this lock has been lost. See the .I "Lost locks" section of -.BR fcntl (2) +.MR fcntl 2 for further details. .TP .B ENOSPC @@ -212,7 +212,7 @@ has no room for the data. .TP .B EPERM The operation was prevented by a file seal; see -.BR fcntl (2). +.MR fcntl 2 . .TP .B EPIPE .I fd @@ -245,11 +245,11 @@ that space has successfully been reserved for the data. In this case, some errors might be delayed until a future .BR write (), -.BR fsync (2), +.MR fsync 2 , or even -.BR close (2). +.MR close 2 . The only way to be sure is to call -.BR fsync (2) +.MR fsync 2 after you are done writing all your data. .P If a @@ -289,17 +289,17 @@ operate on regular files or symbolic links: ... Among the APIs subsequently listed are .BR write () and -.BR writev (2). +.MR writev 2 . And among the effects that should be atomic across threads (and processes) are updates of the file offset. However, before Linux 3.14, this was not the case: if two processes that share an open file description (see -.BR open (2)) +.MR open 2 ) perform a .BR write () (or -.BR writev (2)) +.MR writev 2 ) at the same time, then the I/O operations were not atomic with respect to updating the file offset, with the result that the blocks of data output by the two processes @@ -316,14 +316,14 @@ This problem was fixed in Linux 3.14. .\" .\" vfs: atomic f_pos accesses as per POSIX .SH SEE ALSO -.BR close (2), -.BR fcntl (2), -.BR fsync (2), -.BR ioctl (2), -.BR lseek (2), -.BR open (2), -.BR pwrite (2), -.BR read (2), -.BR select (2), -.BR writev (2), -.BR fwrite (3) +.MR close 2 , +.MR fcntl 2 , +.MR fsync 2 , +.MR ioctl 2 , +.MR lseek 2 , +.MR open 2 , +.MR pwrite 2 , +.MR read 2 , +.MR select 2 , +.MR writev 2 , +.MR fwrite 3 |