diff options
author | 2013-03-09 21:05:29 +0000 | |
---|---|---|
committer | 2013-03-09 21:05:29 +0000 | |
commit | c22890298e20966b5e7b37152a81f7758d353363 (patch) | |
tree | 7bd6d0aecc016d3115acfc4108f01f7d519dc629 /lib/libc | |
parent | Bring back got and plt padding sections and special symbols from our changes (diff) | |
download | wireguard-openbsd-c22890298e20966b5e7b37152a81f7758d353363.tar.xz wireguard-openbsd-c22890298e20966b5e7b37152a81f7758d353363.zip |
Describe interaction between write and O_APPEND.
Pointed out by Sachidananda on tech
Diffstat (limited to 'lib/libc')
-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. |