HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)

i
ioctl(5) ioctl(5)
of bytes it was able to read;
If there is no data available, the read fails and errno is set to [EWOULDBLOCK].
For writes, non-blocking I/O prevents all write requests to that device file from block-
ing, whether the requests succeed or fail. Such a write request completes in one of
three ways:
If there is enough space available in the system to buffer all the data, the write
completes successfully, having written out all of the data, and returns the number
of bytes written;
If there is not enough space in the buffer to write out the entire request, the write
completes successfully, having written as much data as possible, and returns the
number of bytes it was able to write;
If there is no space in the buffer, the write fails and
errno is set to [EWOULD-
BLOCK].
To prohibit non-blocking I/O from interfering with the
O_NDELAY flag (see open (2)
and fcntl (2)), the functionality of
O_NDELAY always supersedes the functionality of
non-blocking I/O. This means that if
O_NDELAY
is set, the driver performs read
requests in accordance with the definition of O_NDELAY. When O_NDELAY is not
set, the definition of non-blocking I/O applies.
The default on open of a device file is that non-blocking I/O is disabled.
FIOGNBIO For those character device files which support this command, the integer whose
address is arg is set to 1, if non-blocking I/O is enabled. Otherwise, the integer whose
address is arg is set to 0.
WARNINGS
FIOSSAIOSTAT is similar to 4.2 BSD FIOASYNC, with the addition of provisions for security. FIOG-
SAIOSTAT is of HP origin, complements FIOSSAIOSTAT, and allows saving and restoring system asyn-
chronous I/O TTY state for BSD style job control. FIOSSAIOOWN is similar to 4.2 BSD FIOSETOWN
,
with the addition of provisions for security.
FIOGSAIOOWN is similar to 4.2 BSD FIOGETOWN. Note
also the difference that the 4.2 BSD version of this functionality used process groups, while the HP-UX
version only uses processes. FIOSNBIO is the same as 4.2 BSD FIONBIO, except that it does not inter-
fere with the AT&T O_NDELAY open and fcntl flag. FIOGNBIO is of HP origin, complements
FIOSNBIO, and allows saving and restoring non-blocking I/O TTY state for BSD-style job control.
SEE ALSO
ioctl(2), socket(7), arp(7).
Section 7 of this manual.
HP-UX 11i Version 2: September 2004 2 Hewlett-Packard Company Section 5151