HP-UX Reference (11i v3 07/02) - 5 Miscellaneous Topics (vol 9)
i
ioctl(5) ioctl(5)
it was able to read;
• If there is no data available, the read fails and errno is set to [EWOULDBLOCK].
For writes, nonblocking 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 com-
pletes 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 nonblocking 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
nonblocking 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 nonblocking I/O applies.
The default on open of a device file is that nonblocking 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 nonblocking 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.
FIOGSAIOSTAT is of HP origin, complements FIOSSAIOSTAT , and allows saving and restoring system
asynchronous 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 interfere with the AT&T
O_NDELAY
open and fcntl flag.
FIOGNBIO is of HP origin, complements FIOSNBIO, and allows saving and restoring nonblocking I/O
TTY state for BSD-style job control.
SEE ALSO
ioctl(2), arp(7P), socket(7).
Section 7 of the HP-UX Reference.
212 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: February 2007