Open System Services System Calls Reference Manual (G06.28+, H06.05+)

writev(2) OSS System Calls Reference Manual
When attempting to write to a socket with no space available for data:
If the O_NONBLOCK ag is not set, the writev( ) function blocks until space becomes
available or an error occurs.
If the O_NONBLOCK ag is set, the writev( ) function returns the value -1 and sets
errno to [EWOULDBLOCK].
Upon successful completion, the writev() function marks the st_ctime and st_mtime elds of
the le for update and clears the set-user-ID and set-group-ID attributes if the le is a regular le.
The fcntl() function provides more information about record locks.
If it is interrupted by a signal before it writes any data, the writev() function returns the value -1
with errno set to [EINTR]. If it is interrupted by a signal after it has successfully written some
data, the writev() function returns the number of bytes that it has written.
Use on Guardian Objects
Attempting to write to a Guardian le (that is, a le in /G) that is locked causes the writev()
function to return -1 and set errno to [EGUARDIANLOCKED].
RETURN VALUES
Upon successful completion, the writev() function returns the number of bytes that were actually
written. Otherwise, the value -1 is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the writev() function sets errno to the corresponding value:
[EAGAIN] One of these conditions occurred:
An attempt was made to write to a le descriptor that cannot accept data,
and the O_NONBLOCK ag is set.
A write to a pipe (FIFO le) of PIPE_BUF bytes or less is requested,
O_NONBLOCK is set, and not enough free space is available.
The O_NONBLOCK ag is set on this le, and the process would be
delayed in the write operation.
[EBADF] The ledes parameter is not a valid le descriptor open for writing.
[ECONNRESET]
One of these conditions occurred:
The transport-provider process for this socket is no longer available.
The TCP/IP subsystem for this socket is no longer available.
The connection was forcibly closed by the peer socket.
The le descriptor specied by the ledes parameter can only be closed.
[EFAULT] Part of the iov parameter points to a location outside of the allocated address
space of the process.
[EFBIG] The application is attempting to write at or beyond the le offset maximum esta- |
blished when the le was opened.
1020 Hewlett-Packard Company 527186-007