Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (s and S) spt_freadx(2)
and is not blocked, ignored, or handled, EOF is returned with an errno value of [EINTR].
ERRORS
The spt_freadx() function fails if:
The stream parameter is not open for reading.
The stream is unbuffered.
The stream’s buffer needed to be flushed and the function call caused an underlying
spt_writex() or lseek() to be invoked and this underlying operation fails.
In addition, if any of the following conditions occur, the spt_freadx() function sets errno to the
corresponding value:
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying the input
stream and the process would be delayed in the read operation.
[EBADF] The file descriptor underlying the input stream is not a valid file descriptor open
for reading.
[EINTR] The read operation was interrupted by a signal that was caught, and no data was
transferred.
[EIO] The implementation supports job control; the process is a member of a back-
ground process group attempting to write to its controlling terminal; TOSTOP is
set; the process is neither ignoring nor blocking SIGTTOU; and the process
group of the process is orphaned. This error may also be returned under
implementation-defined conditions.
[ENOMEM] Insufficient memory storage space is available.
[ENOSPC] There was no free space remaining on the device containing the file.
[ENXIO] A request was made of a nonexistent device, or the request was outside the capa-
bilities of the device.
[EPIPE] An attempt was made to read from a pipe or FIFO that is not open for writing by
any process. A SIGPIPE signal will also be sent to the process.
Any error encountered during the underlying call to the spt_readx() function can cause this
function to return the corresponding errno value reported by the spt_readx() function. If your
application program encounters an errno value not listed above, refer to the spt_readx(2) refer-
ence page either online or in the Open System Services System Calls Reference Manual for infor-
mation about the cause of that error.
RELATED INFORMATION
Functions: fopen(3), fread(3), fwrite(3), getc(3), gets(3), printf(3), putc(3), puts(3), read(2),
scanf(3), spt_fwritex(2), spt_getcx(2), spt_getsx(2), spt_printfx(2), spt_putcx(2), spt_putsx(2),
spt_readx(2), spt_writex(2), write(2).
STANDARDS CONFORMANCE
This function is an extension to the UNIX 98 specification. Interfaces documented on this refer-
ence page conform to the following industry standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
527186-023 Hewlett-Packard Company 7225