#include <sys/uio.h> ssize_t writev( int fd, const struct iovec *iov, int iovcnt );
In addition to the errors detected by
Input and Output Primitives Manager write - Write to a file, write()
,
this routine may return -1 and sets errno
based upon the following
errors:
iov_len
values in the iov array overflowed an
ssize_t
.
iovcnt
argument was less than or equal to 0, or greater
than IOV_MAX
.
The writev()
function is equivalent to write()
,
except as noted here. The writev()
function gathers output
data from the iovcnt
buffers specified by the members of
the iov array
: iov[0], iov[1], ..., iov[iovcnt-1]
.
The iovcnt
argument is valid if greater than 0 and less
than or equal to IOV_MAX
.
Each iovec
entry specifies the base address and length of
an area in memory from which data should be written. The writev()
function always writes a complete area before proceeding to the next.
If fd
refers to a regular file and all of the iov_len
members in the array pointed to by iov
are 0, writev()
returns 0 and has no other effect. For other file types, the behavior
is unspecified by POSIX.
NONE
Copyright © 1988-2008 OAR Corporation