summaryrefslogtreecommitdiff
path: root/lib/libc/sys/write.2
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-10-18 05:12:14 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-10-18 05:12:14 +0000
commitf29d8bd9c9c901b81d8fadc341786c43528e63c1 (patch)
treea5fc4e4696d058bee8f5a8c5498044c06a963bda /lib/libc/sys/write.2
parent906e3d9014b754421b64647e705b3cca2e9a7c01 (diff)
Another round of man page cleanup, this time to remove more hard sentence
breaks and getting rid of short lines, making these files easier to work with.
Diffstat (limited to 'lib/libc/sys/write.2')
-rw-r--r--lib/libc/sys/write.251
1 files changed, 21 insertions, 30 deletions
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2
index e2bf3d95162..860932e0d59 100644
--- a/lib/libc/sys/write.2
+++ b/lib/libc/sys/write.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: write.2,v 1.20 2000/04/20 06:34:37 deraadt Exp $
+.\" $OpenBSD: write.2,v 1.21 2000/10/18 05:12:12 aaron Exp $
.\" $NetBSD: write.2,v 1.6 1995/02/27 12:39:43 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -64,8 +64,7 @@ of data to the object referenced by the descriptor
from the buffer pointed to by
.Fa buf .
.Fn writev
-performs the same action, but gathers the output data
-from the
+performs the same action, but gathers the output data from the
.Fa iovcnt
buffers specified by the members of the
.Fa iov
@@ -98,13 +97,11 @@ in memory from which data should be written.
.Fn writev
and
.Fn pwritev
-will always write a complete area before proceeding
-to the next.
+will always write a complete area before proceeding to the next.
.Pp
On objects capable of seeking, the
.Fn write
-starts at a position
-given by the pointer associated with
+starts at a position given by the pointer associated with
.Fa d
(see
.Xr lseek 2 ) .
@@ -113,17 +110,15 @@ Upon return from
the pointer is incremented by the number of bytes which were written.
.Pp
Objects that are not capable of seeking always write from the current
-position. The value of the pointer associated with such an object
-is undefined.
+position.
+The value of the pointer associated with such an object is undefined.
.Pp
If the real user is not the superuser, then
.Fn write
clears the set-user-ID bit on a file.
-This prevents penetration of system security
-by a user who
+This prevents penetration of system security by a user who
.Dq captures
-a writable set-user-ID file
-owned by the superuser.
+a writable set-user-ID file owned by the superuser.
.Pp
If
.Fn write
@@ -136,8 +131,7 @@ to flow control,
.Fn write
and
.Fn writev
-may write fewer bytes than requested;
-the return value must be noted,
+may write fewer bytes than requested; the return value must be noted,
and the remainder of the operation should be retried when possible.
.Pp
Note that
@@ -150,7 +144,8 @@ exceedes the constant
.Dv IOV_MAX .
.Sh RETURN VALUES
Upon successful completion the number of bytes which were written
-is returned. Otherwise, a \-1 is returned and the global variable
+is returned.
+Otherwise, a \-1 is returned and the global variable
.Va errno
is set to indicate the error.
.Sh ERRORS
@@ -179,16 +174,15 @@ The pointer associated with
.Fa d
was negative.
.It Bq Er ENOSPC
-There is no free space remaining on the file system
-containing the file.
+There is no free space remaining on the file system containing the file.
.It Bq Er EDQUOT
-The user's quota of disk blocks on the file system
-containing the file has been exhausted.
+The user's quota of disk blocks on the file system containing the file
+has been exhausted.
.It Bq Er EIO
An I/O error occurred while reading from or writing to the file system.
.It Bq Er EAGAIN
-The file was marked for non-blocking I/O,
-and no data could be written immediately.
+The file was marked for non-blocking I/O, and no data could be
+written immediately.
.El
.Pp
In addition,
@@ -200,8 +194,8 @@ may return the following error:
.It Bq Er EFAULT
Part of
.Fa iov
-or data to be written to the file
-points outside the process's allocated address space.
+or data to be written to the file points outside the process's
+allocated address space.
.It Bq Er EINVAL
.Fa nbytes
was larger than
@@ -273,18 +267,15 @@ Proper loops should use
.Sh HISTORY
The
.Fn pwritev
-function call
-appeared in
+function call appeared in
.Ox 2.7 .
The
.Fn pwrite
-function call
-appeared in
+function call appeared in
.At V.4 .
The
.Fn writev
-function call
-appeared in
+function call appeared in
.Bx 4.2 .
The
.Fn write