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

spt_readvx(2) OSS System Calls Reference Manual
If some process has the pipe open for writing:
If the O_NONBLOCK ag is not set, the spt_readvx() function blocks until
either some data is written or the pipe is closed by all processes that had opened
the pipe for writing.
If the O_NONBLOCK ag is set, the spt_readvx() function returns the value -1
and sets errno to [EAGAIN].
When attempting to read from a socket and no data is currently available:
If the O_NONBLOCK ag is not set, the spt_readvx() function blocks until data
becomes available.
If the O_NONBLOCK ag is set, the spt_readvx() function returns the value -1 and
sets errno to [EAGAIN]. The O_NONBLOCK ag has no effect if there is data avail-
able.
When attempting to read from a character special le that supports nonblocking reads, such as a
terminal, and no data is currently available:
If the O_NONBLOCK ag is not set, the spt_readvx() function blocks until data
becomes available.
If the O_NONBLOCK ag is set, the spt_readvx() function returns the value -1 and
sets errno to [EAGAIN]. The O_NONBLOCK ag has no effect if there is data avail-
able.
If it is interrupted by a signal before it reads any data, the spt_readvx() function returns the
value -1 with errno set to [EINTR]. If it is interrupted by a signal after it has successfully read
some data, the spt_readvx() function returns the number of bytes read.
When reading from a device special le, the return of EOF has no effect on subsequent calls to
the spt_readvx() function. When modem disconnect is detected, an EOF is returned. The errno
variable is not set to [EIO].
Upon successful completion, the spt_readvx() function marks the st_atime eld of the le for
update.
The iov_count parameter species the number of entries (buffers) in the iovec structure pointed
to by the iov parameter. Each iovec entry species the base address and length of an area in
memory where data should be placed. The spt_readvx() function always lls a buffer com-
pletely before proceeding to the next.
The iovec structure is dened in the sys/uio.h header le and contains entries with these
members:
caddr_t iov_base;
int iov_len;
Use on Guardian Objects
After a call to the fork(), tdm_fork( ),ortdm_spawn( ) function, the initial position within a
Guardian EDIT le (a le in /G with le code 101) is the same for both parent and child
processes. However, the position is not shared; moving the current position from within one pro-
cess does not move it in the other process.
7248 Hewlett-Packard Company 527186-005