diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2013-03-09 21:05:30 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2013-03-09 21:05:30 +0000 |
commit | 9afc9d102cb5717983cd5e2b380a5b99f59591c2 (patch) | |
tree | fe9e57481d0a03d6d39b4fd4a09d0546b900f58a /lib | |
parent | b64dd345b2304636b68645cc22f7d077b1542b3c (diff) |
Describe interaction between write and O_APPEND.
Pointed out by Sachidananda on tech
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/write.2 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index f5c8460aac5..11929c72c71 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: write.2,v 1.35 2011/11/06 12:07:22 deraadt Exp $ +.\" $OpenBSD: write.2,v 1.36 2013/03/09 21:05:29 tedu Exp $ .\" $NetBSD: write.2,v 1.6 1995/02/27 12:39:43 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" -.Dd $Mdocdate: November 6 2011 $ +.Dd $Mdocdate: March 9 2013 $ .Dt WRITE 2 .Os .Sh NAME @@ -107,6 +107,13 @@ starts at a position given by the pointer associated with Upon return from .Fn write , the pointer is incremented by the number of bytes which were written. +If a file was opened with the O_APPEND flag (see +.Xr open 2 ) , +calls to +.Fn write +or +.Fn writev +will automatically set the pointer to the end of the file before writing. .Pp Objects that are not capable of seeking always write from the current position. |