The poll system call enables a user to monitor
multiple Streams in a synchronous fashion.
The poll call normally blocks until an event occurs on any of
the polled file descriptors.
In some applications, however, it is desirable to
process incoming data asynchronously.
For example, an application may want to do some local
processing and be interrupted when a pending event occurs.
Some time-critical applications cannot afford to block,
but must have immediate indication of success or failure.
The I_SETSIG ioctl call (see
is used to request that a
``SIGPOLL'' signal be sent to a user process when a specific event occurs.
Listed below are events for the ioctl I_SETSIG.
These are similar to those described for poll.
A message other than an M_PCPROTO is
at the front of the Stream head read queue.
This event is maintained for compatibility
with the previous releases of the UNIX System V.
A normal (nonpriority) message is at the front of the Stream head read queue.
A priority message (band > 0) is at the front of the Stream head read queue.
A high-priority message (M_PCPROTO) is present at the front of the Stream head
A write queue for normal data (priority band = 0) is no longer full
(not flow controlled).
This notifies a user that there is room on the queue for sending or writing normal
The same as S_OUTPUT.
A priority band greater than 0 of a queue downstream exists and is writable.
This notifies a user that there is room on the queue for sending or writing
priority data downstream.
An M_SIG or M_PCSIG message containing the ``SIGPOLL'' flag
has reached the front of Stream head read queue.
An M_ERROR message reaches the Stream head.
An M_HANGUP message reaches the Stream head.
When used with S_RDBAND, SIGURG is generated instead ``SIGPOLL''
when a priority message reaches the front of the Stream head read queue.
S_INPUT, S_RDNORM, S_RDBAND, and S_HIPRI are set
even if the message is of zero length.
A user process may choose to handle only high-priority messages by setting the
arg to S_HIPRI.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004