HP-UX 11i v3 March 2011 Release Notes (Edition 3)
Performance
There are no known performance issues.
Documentation
See the fcntl(2) manpage.
Obsolescence
Not applicable.
poll(2) system call
The poll(2) system call provides a general mechanism for reporting I/O conditions associated with
a set of file descriptors and for waiting until one or more specified conditions becomes true.
Summary of Change
Prior to update
Previously, when the poll(2) system call was called for the POLLIN condition on a pipe or fifo file
descriptors opened with the O_NONBLOCK flag and there was no corresponding writer, the POLLIN
condition was set in the reported conditions of the poll(2) system call. The subsequent call to a
read(2) system call was returning zero bytes, as there was no writer to fill the pipe or fifo.
A terminating writer was not identified by setting a POLLHUP event in the reported conditions of
the poll(2) system call called-for POLLIN event on a pipe or fifo of file descriptor, when the existing
writer at the other end terminated.
With update in March 2011
The poll(2) system call has been updated so that, if there is no writer at the other end of pipe or
fifo, pipe and fifo file descriptors wait in the poll(2) system call. Upon detecting the termination of
a writer, the POLLHUP conditions are set in the return condition of the poll(2) system call.
All of these changes are enabled through a dynamic tunable named poll_fifo. The default
value is 0, meaning the new functionality is not enabled. To enable this feature, poll_fifo should
be tuned to a value 1. This tunable is not documented elsewhere.
The update for poll(2) is delivered in the HP-UX 11i v3 March 2011 Update Release or through
PHKL_41419 and PHKL_41421.
Impact
Customer applications will not have any impact if the tunable is not turned on.
Compatibility
By enabling the tunable, applications calling poll(2) system call on pipe or fifo descriptors will
notice the new behavior as documented above.
Performance
There are no known performance issues
Documentation
Also see the poll(2) manpage.
Obsolescence
Not applicable.
104 Commands and system calls