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

System Functions (s and S) spt_putwx(2)
#dene SPT_THREAD_AWARE_PRAGMA_NONBLOCK
RETURN VALUES
The spt_putwx() function, upon successful completion, returns a value of 0 (zero). Otherwise, it
returns a nonzero value.
If the le descriptor underlying stream becomes invalid (is closed by another thread), a nonzero
value is returned with an errno value of [EBADF]. If a signal is received via the pthread_kill()
function and is not blocked, ignored, or handled, a nonzero value is returned with an errno value
of [EINTR].
ERRORS
The spt_putwx() function fails if either the stream is unbuffered, or the streams buffer needed
to be ushed 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_putwx() function sets errno to the corresponding value.
[EAGAIN] The O_NONBLOCK ag is set for the le descriptor underlying stream and the
process would be delayed in the write operation.
[EBADF] The le descriptor underlying stream is not a valid le descriptor open for writ-
ing.
[EFBIG] An attempt was made to write to a le that exceeds the processs le size limit or
the maximum le size.
[EINTR] The write 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-dened conditions.
[ENOMEM] Insufcient storage space available.
[ENOSPC] There was no free space remaining on the device containing the le.
[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 write to a pipe or FIFO that is not open for reading by
any process. A SIGPIPE signal will also be sent to the process.
RELATED INFORMATION
Functions: ferror(3), fputc(3), getc(3), getwc(3), printf(3), putc(3), putchar(3), puts(3),
putwc(3), spt_fputcx(2), spt_getcx(2), spt_getwcx(2), spt_printfx(2), spt_putcx(2),
spt_putcharx(2), spt_putsx(2), spt_putwcx(2).
STANDARDS CONFORMANCE
This function is an extension to the UNIX 98 specication. 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 le spthread.h is an HP exception to the POSIX standard.puts(3),
527186-005 Hewlett-Packard Company 7235