readv(2) DG/UX 5.4.2 readv(2)
NAME
readv - read from file
SYNOPSIS
#include <sys/types.h>
#include <sys/uio.h>
int readv (fildes, iov, iovent)
int fildes;
struct iovec iov[];
int iovent;
where:
fildes An active, valid file descriptor
iov An array of extents
iovent The number of extents given
DESCRIPTION
Readv transfers data from the object associated with fildes into the
iovent buffers specified by the members of iov[]: iov[0], iov[1],
..., iov[iovent-1]. Each iov[] member specifies the base address and
length of an area in memory where data should be placed. Readv fills
an area completely before proceeding to the next.
The iov structure is defined as:
struct iovec {
caddrt iovbase;
int iovlen;
};
Iovent must be a positive number less than or equal to a system-
imposed limit guaranteed to be at least MAXIOVCNT. The length of
each extent (iov_len) in iov[] must be non-negative and the sum of
these lengths must not overflow a `long'.
Except for the disposition of the data, readv is equivalent to read.
ACCESS CONTROL
Fildes must be open for reading.
RETURN VALUE
0..nbyte Completed successfully. The number of bytes actually read
is returned. The value 0 indicates the `end-of-file'
condition. Here, nbyte is the sum of the lengths of the
iovent extents given in iov[].
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EBADF Fildes is not a valid file descriptor open for reading.
Licensed material--property of copyright holder(s) 1
readv(2) DG/UX 5.4.2 readv(2)
EAGAIN O_NDELAY is set on the I/O channel and there is a mandatory
lock on the file owned by a different process.
EAGAIN A read was attempted on an empty pipe that another process
has open for writing.
EAGAIN A read was attempted on an I/O channel that had O_NDELAY
set, but there was no data ready to be read at the time of
the call.
EFAULT Iov points outside the allocated address space.
EFAULT One or more of the iov[] members point outside the
allocated address space.
EINTR A signal was caught during the system call.
EINVAL Iovent was invalid.
EINVAL One or more of the iov_len values in iov[] was negative.
EINVAL The sum of the iov_len values in iov[] overflowed a `long'.
SEE ALSO
creat(2), dup(2), dup2(2), fcntl(2), ioctl(2), open(2), pipe(2),
read(2), select(2), socket(2), socketpair(2), termio(7).
Licensed material--property of copyright holder(s) 2